# Quote template using crm\_associations() HubL function

**URL:** <https://community.hubspot.com/t/quote-template-using-crm-associations-hubl-function/73125>\
**Category:** CMS Development\
**Created:** [January 17, 2023, 11:21pm UTC](https://community.hubspot.com/t/quote-template-using-crm-associations-hubl-function/73125 "2023-01-17T23:21:14Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![PD](https://avatars.discourse-cdn.com/v4/letter/p/82dd89/32.png) [@PD](https://community.hubspot.com/u/PD)\
**Post date:** [January 17, 2023, 11:21pm UTC](https://community.hubspot.com/t/quote-template-using-crm-associations-hubl-function/73125/1 "2023-01-17T23:21:14Z")

</div>

**Background**

I’m trying to use the [crm\_associations() HubL function](https://developers.hubspot.com/docs/cms/hubl/functions#crm-associations) in a custom quote template to look up companies associated with the deal. A deal can have two companies: one is the purchaser, and the other is a consultant that assists the purchaser with installation of our product. We use custom association types to represent these different types of deal-to-company associations.

For each quote I’m trying to look up both companies so each one can be included on the quote template.

**Problem**

The problem is that no matter what I try, the crm\_associations() function always returns an object with a total of 0 and an empty results array.

Here’s an example of what I’ve tried that I think should work:

`{% set deal_consultant = crm_associations(deal_id, "USER_DEFINED", 111, "limit=3") %} `

I noticed that the [function documentation](https://developers.hubspot.com/docs/cms/hubl/functions#crm-associations) mentions “ **Please note:** for security purposes, of the [HubSpot standard object types](https://knowledge.hubspot.com/crm-setup/get-started-with-objects#standard-objects) only the product, and marketing\_event objects can be retrieved on a publicly accessible page.”

**Questions**

Do quote templates count as “publicly accessible” pages? Is this the reason I’m not getting any results?

Is there a way to password protect a quote such that I can actually make use of the crm\_associations function? Or is there any other way to show both companies on a quote?

---

<div class="post-metadata">

**Author:** ![alyssamwilie](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/alyssamwilie/32/2072_2.png) [@alyssamwilie](https://community.hubspot.com/u/alyssamwilie)\
**Post date:** [January 18, 2023, 5:10am UTC](https://community.hubspot.com/t/quote-template-using-crm-associations-hubl-function/73125/2 "2023-01-18T05:10:26Z")

</div>

Since the quotes crm object is also only allowed on private pages I can’t imagine quotes themselves would be counted as public.

Is 111 the correct association ID for ya’ll’s custom association?

If you output deal\_id in the quote is it actually returning a value?

---

<div class="post-metadata">

**Author:** ![PD](https://avatars.discourse-cdn.com/v4/letter/p/82dd89/32.png) [@PD](https://community.hubspot.com/u/PD)\
**Post date:** [January 18, 2023, 9:55pm UTC](https://community.hubspot.com/t/quote-template-using-crm-associations-hubl-function/73125/3 "2023-01-18T21:55:03Z")

</div>

I output the deal ID that I’m using in the function and it was correct.

I confirmed that 111 is the correct association type ID. When I use the Associations API ( [https://api.hubapi.com/crm/v4/objects/deal/](https://api.hubapi.com/crm/v4/objects/deal/)\<DEAL\_ID\>/associations/company ) I get back the response below ( toObjectIds have been modified). You’ll see that one of the results has a typeId of 111.

```lia-code-sample
{
 "results": [
 {
 "toObjectId": 10111111111,
 "associationTypes": [
 {
 "category": "HUBSPOT_DEFINED",
 "typeId": 5,
 "label": "Primary"
 },
 {
 "category": "HUBSPOT_DEFINED",
 "typeId": 341,
 "label": null
 }
 ]
 },
 {
 "toObjectId": 10222222222,
 "associationTypes": [
 {
 "category": "USER_DEFINED",
 "typeId": 111,
 "label": "Consultant"
 },
 {
 "category": "HUBSPOT_DEFINED",
 "typeId": 341,
 "label": null
 }
 ]
 }
 ]
}

```

---

<div class="post-metadata">

**Author:** ![tss\_developer](https://avatars.discourse-cdn.com/v4/letter/t/e480ec/32.png) [@tss\_developer](https://community.hubspot.com/u/tss_developer)\
**Post date:** [May 23, 2025, 4:31pm UTC](https://community.hubspot.com/t/quote-template-using-crm-associations-hubl-function/73125/4 "2025-05-23T16:31:08Z")

</div>

Is there any resolution to this question? I am encountering the same issue…

---

<div class="post-metadata">

**Author:** ![kennedyp](https://avatars.discourse-cdn.com/v4/letter/k/49beb7/32.png) [@kennedyp](https://community.hubspot.com/u/kennedyp)\
**Post date:** [June 2, 2025, 10:09pm UTC](https://community.hubspot.com/t/quote-template-using-crm-associations-hubl-function/73125/5 "2025-06-02T22:09:08Z")

</div>

Hey [@tss\_developer](https://community.hubspot.com/t5/user/viewprofilepage/user-id/702523) ! I don’t see any resolution on this thread, but given how much time has passed, I recommend making a new thread with context about your specific use case. Feel free to link to it here and we can tag in some active community members!
