Hi Hubspot Community,
I’m at a bit of a loss here and can’t seem to find the solution to a problem I’m having. I’m essentially trying to create a client events calendar page that would be hosted within a client hub (password protected). This page essentially pulled in CRM objects (deals) based on their association with the company selected on a module custom field. I have all of this working fine.
However, I want to also be able to then use the first associated contact (for the deal not the company) to give the user the ability to filter through the results. However, when I try and loop through the contacts I only get 9 results when there should be 24.
Here’s a snippet of what I’ve been doing:
{% set associated_deals = crm_associations( module.company.id, 'HUBSPOT_DEFINED', 6, 'limit=100&orderBy=event_date', 'hs_object_id') %}
{% for deal in associated_deals.results %}
{% set associated_contacts = crm_associations(deal.hs_object_id, 'HUBSPOT_DEFINED', 3, 'limit=1', 'firstname,lastname,hs_object_id') %}
{% for contact in associated_contacts.results %}
<p>{{ contact.firstname }} {{ contact.lastname }}: {{contact.hs_object_id}}<br></p>
{% endfor %}
{% endfor %}
I can’t seem to find any documentation about this kind of issue and not sure exactly what I’m doing wrong. Any guidance or help would be greatly appreciated.