Sales Hub Tools

ChrisChiha
Top Contributor

Fetching Associated Custom Objects into Quote template

SOLVE

Hello,
 
So i am creating a custom quote template that can be generated from a deal, and that gets populated from the deal itself and the objects associated to it.
 
So far i was able to fetch property value from the deal, company and contact object. (For example contact first name+last name, deal bank name, company name,...)
  
Screen Shot 2022-06-08 at 8.51.32 AM.png
  
But when i try to fetch a certain property value from the custom object associated to the deal, it is not working when i try the same method as the contact and deal object.
 
I was able to fetch all the properties of the associated custom object using the below lines of code:
{% setcustomobject=QUOTE.associated_objects.deal.associated_objects.custom_objects %}

{% for Property in customobject %}
{{ Property }}
{% endfor %}
 Note to avoid confusion: my custom object is named "Property". It refer to a property/house
  
The above line of code returns the following (All the properties in the associated custom object). 
  Screen Shot 2022-06-08 at 8.49.32 AM.png
I almost tried everything to try to fetch only the "property_name" for example, but it wouldn't work. I just want to be able to call only one property value from the associated custom object.
  
Thanks in advance for any input you couple provide.
 
@ChrisChiha 

0 Upvotes
1 Accepted solution
ChrisChiha
Solution
Top Contributor

Fetching Associated Custom Objects into Quote template

SOLVE

Hello @TiphaineCuisset ,
 
Please note that i was able to solve the above issue by referencing the custom object type ID found the the index page of the custom object:
 
{% set customobject = template_data.quote.associated_objects.deal.associated_objects.custom_objects.customobjecttypeID %}

View solution in original post

6 Replies 6
TiphaineCuisset
Community Manager
Community Manager

Fetching Associated Custom Objects into Quote template

SOLVE

Hi @ChrisChiha 

 

Thank you for reaching out and for all the details!

 

I want to tag some of our experts here - @himanshurauthan @LMeert @miljkovicmisa do you have any advice for @ChrisChiha on this? 

 

Thank you!

Best

Tiphaine


Saviez vous que la Communauté est disponible en français?
Rejoignez les discussions francophones en changeant votre langue dans les paramètres !

Did you know that the Community is available in other languages?
Join regional conversations by changing your language settings !


0 Upvotes
ChrisChiha
Solution
Top Contributor

Fetching Associated Custom Objects into Quote template

SOLVE

Hello @TiphaineCuisset ,
 
Please note that i was able to solve the above issue by referencing the custom object type ID found the the index page of the custom object:
 
{% set customobject = template_data.quote.associated_objects.deal.associated_objects.custom_objects.customobjecttypeID %}

Gabriel_Guigue
Contributor

Fetching Associated Custom Objects into Quote template

SOLVE

Hello @ChrisChiha 

Sorry for the dummy question, but where do you copy these lines of code, inside your custom Quote template? I mean in which "Container" of the custom Quote template? 
Thanks in advance for your help!

0 Upvotes
ChrisChiha
Top Contributor

Fetching Associated Custom Objects into Quote template

SOLVE

Hello @Gabriel_Guigue ,
 
You can use these lines of codes inside your HTML/Hubl quote template in the design manager tab

Gabriel_Guigue
Contributor

Fetching Associated Custom Objects into Quote template

SOLVE

Thanks a lot @ChrisChiha for your prompt reply.
Inside the design manager, I cannot see the HTML/Hubl quote template. Maybe I'm not looking inside the right place. Could you please share a screenshot?
Thanks.

 

0 Upvotes
TiphaineCuisset
Community Manager
Community Manager

Fetching Associated Custom Objects into Quote template

SOLVE

Thank you for sharing this answer @ChrisChiha !


Saviez vous que la Communauté est disponible en français?
Rejoignez les discussions francophones en changeant votre langue dans les paramètres !

Did you know that the Community is available in other languages?
Join regional conversations by changing your language settings !


0 Upvotes