# Hubspot Associations on Custom Objects Not Working?

**URL:** <https://community.hubspot.com/t/hubspot-associations-on-custom-objects-not-working/71552>\
**Category:** CMS Development\
**Created:** [December 19, 2022, 9:51pm UTC](https://community.hubspot.com/t/hubspot-associations-on-custom-objects-not-working/71552 "2022-12-19T21:51:55Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jsum](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/jsum/32/20405_2.png) [@Jsum](https://community.hubspot.com/u/Jsum)\
**Post date:** [December 19, 2022, 9:51pm UTC](https://community.hubspot.com/t/hubspot-associations-on-custom-objects-not-working/71552/1 "2022-12-19T21:51:55Z")

</div>

I’m confused about how this function works:

`{% set associated_contacts = crm_associations(2337251, "USER_DEFINED", 355, "limit=100") %} `

I am using an association I defined on the custom object. I got the association ID for the edit URL, the docs say I need to do an api call to get it so maybe I’m not using the right number but I don’t think that is the case.

I can use the crm\_associations function and get results for all built in objects. When I try to use the associations I made for custom objects to contacts, for instance, the results are always blank.

If I have a “student” object that I am associating with contacts, the crm\_assocations function will not return a list of contacts associated with a student id, or a list of students associated with a contact id. Am I supposed to be able to get a list of custom objects associated to a specific contact?

---

<div class="post-metadata">

**Author:** ![Jsum](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/jsum/32/20405_2.png) [@Jsum](https://community.hubspot.com/u/Jsum)\
**Post date:** [December 21, 2022, 3:05pm UTC](https://community.hubspot.com/t/hubspot-associations-on-custom-objects-not-working/71552/2 "2022-12-21T15:05:15Z")

</div>

\*bump\*

As far as I can tell there is a bug with the crm\_associations functions that keeps it from working with custom objects. Would appreciate some help…

---

<div class="post-metadata">

**Author:** ![Jsum](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/jsum/32/20405_2.png) [@Jsum](https://community.hubspot.com/u/Jsum)\
**Post date:** [December 22, 2022, 4:59pm UTC](https://community.hubspot.com/t/hubspot-associations-on-custom-objects-not-working/71552/3 "2022-12-22T16:59:53Z")

</div>

The issue is that the only way to get the association ID for a custom crm\_assocation is to do an api call. The ID is not in the URL or anywhere listed in the portal. The only way to use a custom association in code is to first request the association details through the api, like in postman, to get the association ID. I’d like to suggest that a column be added to the dashboard where the associations are listed that show this ID.
