CMS Development

ben-duchy
トップ投稿者

Web module linked to CRM Object

解決

Has anyone had any experience creating web modules that pull the data directly from a CRM object instead of HubDB?

 

I've used this guide that works, but it makes no mention of select list items. I can only get it to pull in data that are stored in text boxes for example {{ event.name }}

 

When data is set within an object select list for example {{ event.region }} the results are blank! I assume I need to add something to this code snippet?

0 いいね!
2件の承認済みベストアンサー
LMeert
解決策
ガイド役 | Platinum Partner
ガイド役 | Platinum Partner

Web module linked to CRM Object

解決

Hi @ben-duchy,

 

I assume you're having problems pulling values from dropdown select fields, is that correct ?

You can try, instead of querying the whole object, to specify the properties you want to return like this :

LMeert_0-1652970196860.png

 

I've just tried it and it works, when querying your object, specify the properties by adding them in the crm_object() function. You have to list the properties' internal name, between quotes and separated by commas.

 

Hope this helps !
If it does, please consider marking this answer as a solution 🙂

 

Best,

Ludwig 

Agence Mi4 - Data DrivenCTO @ Mi4
Hubspot Platinum Partner and Integration Expert

Passionate human, very curious about everything data and automation.

Any problem with Hubspot you need help solving ?

Let me know !

元の投稿で解決策を見る

LMeert
解決策
ガイド役 | Platinum Partner
ガイド役 | Platinum Partner

Web module linked to CRM Object

解決

I don't understand, isn't your for loop doing so ?

By invoking the crm_object function, you created a list of events with name and attendance properties.

Then you loop on your event object and display, for each item, both properties :

LMeert_0-1652977402138.png

If the attendance isn't showing it's because you made a typo on "attendance".

LMeert_1-1652977449085.png

 

Simply remove the pprint portion and the ******* line, and change "attandance" for "attendance" and you're all set 🙂

 

Agence Mi4 - Data DrivenCTO @ Mi4
Hubspot Platinum Partner and Integration Expert

Passionate human, very curious about everything data and automation.

Any problem with Hubspot you need help solving ?

Let me know !

元の投稿で解決策を見る

9件の返信
ben-duchy
トップ投稿者

Web module linked to CRM Object

解決

Hi @LMeert,

 

Thanks for your help with this.

It has indeed worked, however is it possible to format it better?

Current code below...


object.jpg

0 いいね!
ben-duchy
トップ投稿者

Web module linked to CRM Object

解決

You're right CSS can take care of any styling issues, but at the moment my goal is to learn the basics and remove any excess content.

 

Your pprint method has allowed me to show everything including the select list data (the 'yes' on the last item), but I only need to show the event name and attendance fields and not the ID's etc.

 

Is there anything similar to pprint but only for specific fields? It's like I need something along the lines of the hubdb equivalent {{ row["event_attendance"].name }}

0 いいね!
LMeert
解決策
ガイド役 | Platinum Partner
ガイド役 | Platinum Partner

Web module linked to CRM Object

解決

I don't understand, isn't your for loop doing so ?

By invoking the crm_object function, you created a list of events with name and attendance properties.

Then you loop on your event object and display, for each item, both properties :

LMeert_0-1652977402138.png

If the attendance isn't showing it's because you made a typo on "attendance".

LMeert_1-1652977449085.png

 

Simply remove the pprint portion and the ******* line, and change "attandance" for "attendance" and you're all set 🙂

 

Agence Mi4 - Data DrivenCTO @ Mi4
Hubspot Platinum Partner and Integration Expert

Passionate human, very curious about everything data and automation.

Any problem with Hubspot you need help solving ?

Let me know !

ben-duchy
トップ投稿者

Web module linked to CRM Object

解決

Ah, great spot with the typo! I've corrected the spelling and it now works. Thanks very much... it's been a long day! 😀👍

0 いいね!
dennisedson
HubSpot製品開発チーム
HubSpot製品開発チーム

Web module linked to CRM Object

解決

And off goes my favorite gorilla to code another module.  🦍

0 いいね!
ben-duchy
トップ投稿者

Web module linked to CRM Object

解決

@dennisedson my work is never done! Eveytime I complete one project, I find another feature in HubSpot that I need to learn  😂

dennisedson
HubSpot製品開発チーム
HubSpot製品開発チーム

Web module linked to CRM Object

解決

You and me both, friend.

0 いいね!
LMeert
ガイド役 | Platinum Partner
ガイド役 | Platinum Partner

Web module linked to CRM Object

解決

No worries @ben-duchy,

 

The design can of course be improved, but that's a matter of CSS I'd say.

What would you like to improve ?

Agence Mi4 - Data DrivenCTO @ Mi4
Hubspot Platinum Partner and Integration Expert

Passionate human, very curious about everything data and automation.

Any problem with Hubspot you need help solving ?

Let me know !

LMeert
解決策
ガイド役 | Platinum Partner
ガイド役 | Platinum Partner

Web module linked to CRM Object

解決

Hi @ben-duchy,

 

I assume you're having problems pulling values from dropdown select fields, is that correct ?

You can try, instead of querying the whole object, to specify the properties you want to return like this :

LMeert_0-1652970196860.png

 

I've just tried it and it works, when querying your object, specify the properties by adding them in the crm_object() function. You have to list the properties' internal name, between quotes and separated by commas.

 

Hope this helps !
If it does, please consider marking this answer as a solution 🙂

 

Best,

Ludwig 

Agence Mi4 - Data DrivenCTO @ Mi4
Hubspot Platinum Partner and Integration Expert

Passionate human, very curious about everything data and automation.

Any problem with Hubspot you need help solving ?

Let me know !