CMS Development

TCarbuccia
Participant | Diamond Partner
Participant | Diamond Partner

Find a resource with its ID in a quote template

SOLVE

Hello,

 

Is it possible to find a custom object using its HubSpot ID in the quote builder?

This resource isn't linked to my deal; I only have its ID.

 

I haven't been able  to find documentation on this.

Thanks in advance,

Thomas

0 Upvotes
1 Accepted solution
kosalaindrasiri
Solution
Top Contributor | Partner
Top Contributor | Partner

Find a resource with its ID in a quote template

SOLVE

Hey @TCarbuccia,

In HubSpot's quote templates, directly fetching a custom object by its ID using HubL isn't supported. HubL functions like crm_associations() are designed to retrieve associated records, not arbitrary ones by ID.

Hubspot Community Thread

 

Workarounds:

  1. Associate the Custom Object: Link the custom object to the deal or quote so it becomes accessible via crm_associations().
  2. Use CRM Cards or UI Extensions: For more advanced needs, consider building a CRM card or UI extension that fetches and displays the custom object data using HubSpot's APIs. ( https://developers.hubspot.com/docs/guides/api/crm/commerce/quotes & https://developers.hubspot.com/docs/guides/api/crm/extensions/crm-cards )
  3. Pre-fetch and Store Data: If the custom object data is known beforehand, you might store necessary details in a custom property on the quote or deal, making it accessible in the template.

For further details on quote template variables and customization, refer to HubSpot's developer documentation.

 

Regards,

Kosala

Kosala Indrasiri

CEO

Sanmark Solutions
Linkedin
Kosala Indrasiri
emailAddress
kosala@thesanmark.com
website
www.sanmarksolutions.com
linkedinwhatsapp
Book a Consultation

Did my post help answer your question? Mark this as a solution.

View solution in original post

2 Replies 2
kosalaindrasiri
Solution
Top Contributor | Partner
Top Contributor | Partner

Find a resource with its ID in a quote template

SOLVE

Hey @TCarbuccia,

In HubSpot's quote templates, directly fetching a custom object by its ID using HubL isn't supported. HubL functions like crm_associations() are designed to retrieve associated records, not arbitrary ones by ID.

Hubspot Community Thread

 

Workarounds:

  1. Associate the Custom Object: Link the custom object to the deal or quote so it becomes accessible via crm_associations().
  2. Use CRM Cards or UI Extensions: For more advanced needs, consider building a CRM card or UI extension that fetches and displays the custom object data using HubSpot's APIs. ( https://developers.hubspot.com/docs/guides/api/crm/commerce/quotes & https://developers.hubspot.com/docs/guides/api/crm/extensions/crm-cards )
  3. Pre-fetch and Store Data: If the custom object data is known beforehand, you might store necessary details in a custom property on the quote or deal, making it accessible in the template.

For further details on quote template variables and customization, refer to HubSpot's developer documentation.

 

Regards,

Kosala

Kosala Indrasiri

CEO

Sanmark Solutions
Linkedin
Kosala Indrasiri
emailAddress
kosala@thesanmark.com
website
www.sanmarksolutions.com
linkedinwhatsapp
Book a Consultation

Did my post help answer your question? Mark this as a solution.

TCarbuccia
Participant | Diamond Partner
Participant | Diamond Partner

Find a resource with its ID in a quote template

SOLVE

Hello,

I kind of suspected as much.

I'm going to try the workarounds you shared.

Thanks for your help!