<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Quote template using crm_associations() HubL function in CMS Development</title>
    <link>https://community.hubspot.com/t5/CMS-Development/Quote-template-using-crm-associations-HubL-function/m-p/742916#M32353</link>
    <description>&lt;P&gt;&lt;STRONG&gt;Background&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm trying to use the &lt;A href="https://developers.hubspot.com/docs/cms/hubl/functions#crm-associations" target="_blank" rel="noopener"&gt;crm_associations() HubL function&lt;/A&gt; 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.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For each quote I'm trying to look up both companies so each one can be included on the quote template.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Problem&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;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.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here's an example of what I've tried that I think should work:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;{% set deal_consultant = crm_associations(deal_id, "USER_DEFINED", 111, "limit=3") %} &lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I noticed that the &lt;A href="https://developers.hubspot.com/docs/cms/hubl/functions#crm-associations" target="_blank" rel="noopener"&gt;function documentation&lt;/A&gt; mentions "&lt;STRONG&gt;Please note:&lt;/STRONG&gt; for security purposes, of the &lt;A href="https://knowledge.hubspot.com/crm-setup/get-started-with-objects#standard-objects" target="_blank" rel="noopener"&gt;HubSpot standard object types&lt;/A&gt; only the product, and marketing_event objects can be retrieved on a publicly accessible page."&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Questions&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Do quote templates count as "publicly accessible" pages?&amp;nbsp; Is this the reason I'm not getting any results?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;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?&lt;/P&gt;</description>
    <pubDate>Tue, 17 Jan 2023 23:21:14 GMT</pubDate>
    <dc:creator>PD_</dc:creator>
    <dc:date>2023-01-17T23:21:14Z</dc:date>
    <item>
      <title>Quote template using crm_associations() HubL function</title>
      <link>https://community.hubspot.com/t5/CMS-Development/Quote-template-using-crm-associations-HubL-function/m-p/742916#M32353</link>
      <description>&lt;P&gt;&lt;STRONG&gt;Background&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm trying to use the &lt;A href="https://developers.hubspot.com/docs/cms/hubl/functions#crm-associations" target="_blank" rel="noopener"&gt;crm_associations() HubL function&lt;/A&gt; 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.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For each quote I'm trying to look up both companies so each one can be included on the quote template.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Problem&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;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.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here's an example of what I've tried that I think should work:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;{% set deal_consultant = crm_associations(deal_id, "USER_DEFINED", 111, "limit=3") %} &lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I noticed that the &lt;A href="https://developers.hubspot.com/docs/cms/hubl/functions#crm-associations" target="_blank" rel="noopener"&gt;function documentation&lt;/A&gt; mentions "&lt;STRONG&gt;Please note:&lt;/STRONG&gt; for security purposes, of the &lt;A href="https://knowledge.hubspot.com/crm-setup/get-started-with-objects#standard-objects" target="_blank" rel="noopener"&gt;HubSpot standard object types&lt;/A&gt; only the product, and marketing_event objects can be retrieved on a publicly accessible page."&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Questions&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Do quote templates count as "publicly accessible" pages?&amp;nbsp; Is this the reason I'm not getting any results?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;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?&lt;/P&gt;</description>
      <pubDate>Tue, 17 Jan 2023 23:21:14 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/Quote-template-using-crm-associations-HubL-function/m-p/742916#M32353</guid>
      <dc:creator>PD_</dc:creator>
      <dc:date>2023-01-17T23:21:14Z</dc:date>
    </item>
    <item>
      <title>Re: Quote template using crm_associations() HubL function</title>
      <link>https://community.hubspot.com/t5/CMS-Development/Quote-template-using-crm-associations-HubL-function/m-p/743016#M32361</link>
      <description>&lt;P&gt;Since the quotes crm object is also only allowed on private pages I can't imagine quotes themselves would be counted as public.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Is 111 the correct association ID for ya'll's custom association?&lt;/P&gt;
&lt;P&gt;If you output deal_id in the quote is it actually returning a value?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 18 Jan 2023 05:10:26 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/Quote-template-using-crm-associations-HubL-function/m-p/743016#M32361</guid>
      <dc:creator>alyssamwilie</dc:creator>
      <dc:date>2023-01-18T05:10:26Z</dc:date>
    </item>
    <item>
      <title>Re: Quote template using crm_associations() HubL function</title>
      <link>https://community.hubspot.com/t5/CMS-Development/Quote-template-using-crm-associations-HubL-function/m-p/743602#M32377</link>
      <description>&lt;P&gt;I output the deal ID that I'm using in the function and it was correct.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I confirmed that 111 is the correct association type ID. When I use the Associations API ( &lt;SPAN&gt;&lt;A target="_blank" rel="noopener"&gt;https://api.hubapi.com/crm/v4/objects/deal/&amp;lt;DEAL_ID&amp;gt;/associations/company&lt;/A&gt; ) I get back the response below ( toObjectIds have been modified). You'll see that one of the results has a typeId of 111.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;{
    "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
                }
            ]
        }
    ]
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 18 Jan 2023 21:55:59 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/Quote-template-using-crm-associations-HubL-function/m-p/743602#M32377</guid>
      <dc:creator>PD_</dc:creator>
      <dc:date>2023-01-18T21:55:59Z</dc:date>
    </item>
    <item>
      <title>Re: Quote template using crm_associations() HubL function</title>
      <link>https://community.hubspot.com/t5/CMS-Development/Quote-template-using-crm-associations-HubL-function/m-p/1156393#M43115</link>
      <description>&lt;P&gt;Is there any resolution to this question? I am encountering the same issue...&lt;/P&gt;</description>
      <pubDate>Fri, 23 May 2025 16:31:08 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/Quote-template-using-crm-associations-HubL-function/m-p/1156393#M43115</guid>
      <dc:creator>tss_developer</dc:creator>
      <dc:date>2025-05-23T16:31:08Z</dc:date>
    </item>
    <item>
      <title>Re: Quote template using crm_associations() HubL function</title>
      <link>https://community.hubspot.com/t5/CMS-Development/Quote-template-using-crm-associations-HubL-function/m-p/1160093#M43172</link>
      <description>&lt;P&gt;Hey&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/702523"&gt;@tss_developer&lt;/a&gt;&amp;nbsp;! 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!&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 02 Jun 2025 22:09:08 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/Quote-template-using-crm-associations-HubL-function/m-p/1160093#M43172</guid>
      <dc:creator>kennedyp</dc:creator>
      <dc:date>2025-06-02T22:09:08Z</dc:date>
    </item>
  </channel>
</rss>

