CMS Development

JMadrone
Member

Using HubL variables in the crm_object function

SOLVE

I want to pass a query parameter into the crm_object function like this: 

JMadrone_0-1670254939228.png

What is the correct syntax for doing this?

 

I have tried enabling the module for the programmable email beta, but this is not going to be an email template, it is a website page template module. In either case the programmable email beta option didn't resolve the issue either.

0 Upvotes
1 Accepted solution
alyssamwilie
Solution
Recognized Expert | Elite Partner
Recognized Expert | Elite Partner

Using HubL variables in the crm_object function

SOLVE

The object ID is expecting a number, but request.query_dict returns a string. If you add |int to the end of your request it'll change the value into an integer and crm_object should except it.

{% set job_id = request.query_dict['job_id']|int %}

 

If this answer solved your question, please mark it as the solution.

Alyssa Wilie Profile Image

Alyssa Wilie

Web Developerat Lynton

Learn HubL | Get Marketing Insights

HubSpot Elite Solutions Partner
Lynton's HubSpot theme Rubric now available. Click to download.

View solution in original post

3 Replies 3
alyssamwilie
Solution
Recognized Expert | Elite Partner
Recognized Expert | Elite Partner

Using HubL variables in the crm_object function

SOLVE

The object ID is expecting a number, but request.query_dict returns a string. If you add |int to the end of your request it'll change the value into an integer and crm_object should except it.

{% set job_id = request.query_dict['job_id']|int %}

 

If this answer solved your question, please mark it as the solution.

Alyssa Wilie Profile Image

Alyssa Wilie

Web Developerat Lynton

Learn HubL | Get Marketing Insights

HubSpot Elite Solutions Partner
Lynton's HubSpot theme Rubric now available. Click to download.
JMadrone
Member

Using HubL variables in the crm_object function

SOLVE

Yes! Thank you so much.

0 Upvotes
Jaycee_Lewis
Community Manager
Community Manager

Using HubL variables in the crm_object function

SOLVE

Hi, @JMadrone 👋 Thanks for reaching out! Hey, @Teun @alyssamwilie @Jnix284, do you have any tips or troubleshooting steps you can share with @JMadrone?

 

Thank you very much! — Jaycee







HubSpot’s AI-powered customer agent resolves up to 50% of customer queries instantly, with some customers reaching up to 90% resolution rates.


Learn More.





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