Hello Guys New to hubspot,
Hoping anyone can share some idea and how we can display Deals Data using Dynamic pages but on associated contact deals and company deals display based on the one whos logged in of couse its on (membership page).
I have a code running here : It only display all the deals I want to display only associated deals whos logged in including the company deals associated with the contact. Please respect my post and thanks to the folks are willing to share their knowledge. ![]()
{% if dynamic_page_crm_object_type_fqn %}{# dynamic listing page #}
{% set deal = crm_objects(dynamic_page_crm_object_type_fqn, "pipeline=default&limit=200","hs_object_id, amount, dealname, hubspot_owner_id, dealstage, createdate, closedate, company, hs_all_collaborator_owner_ids") %}
{# To see all of the properties your object during development, print it to the page with the |pprint filter #}
<h1>All the deals</h1>
<div class="deal__listing">
{% for deal in deal.results %}
<div class="deal__card">
<div class="deal__details">
<div class="deal__name">
<strong>Deal:</strong> <a href="{{ request.path }}/{{ deal.hs_object_id }}">{{deal.dealname}}</a>
</div>
<div class="deal__amount">
<strong>Amount:</strong> {{deal.amount |format_currency("en-US")}}
</div>
<div class="deal__stage">
<strong>Stage:</strong> <span class="deal__dealer-location"> {{deal.dealstage}}</span>
</div>
<div class="deal__create-date">
<strong>Created on:</strong> <span class="deal__listing-date"> {{deal.createdate }} </span>
</div>
<div class="deal__close-date">
<strong>Close date:</strong> <span class="deal__listing-date"> {{deal.closedate }} </span>
</div>
<div class="deal__owner">
<strong>Deal owner:</strong> <span class="deal__owner"> {{deal.hubspot_owner_id }} </span>
</div>
<div class="deal__name">
<strong>Company:</strong> <a href="{{ request.path }}/{{ deal.hs_object_id }}">{{deal.company}}</a>
</div>
<div class="deal__name">
<strong>Collaborator:</strong> {{deal.hs_all_collaborator_owner_ids}}
</div>
</div>
</div>
{% endfor %}
</div>
{% elif dynamic_page_crm_object %}
<!-- Listing module is hidden when viewing a dynamic pages detail page. -->
{% else %}{# display simple listing for use on other pages #}
{% set deal = crm_objects("deal", "pipeline=default&limit=5","hs_object_id, amount, dealname, hubspot_owner_id, dealstage, createdate, closedate") %}
{# To see all of the properties your object during development, print it to the page with the |pprint filter #}
<section aria-labelledby="object-listing-heading">
<h3 id="object-listing-heading">
All Deals
</h3>
<ul>
{% for deal in deal.results %}
<li><a href="{{ request.path }}/{{ deal.hs_object_id }}">{{ deal.dealname }} ({{ deal.amount }}) in {{ deal.location }}</a></li>
{% endfor %}
</ul>
</section>
{% endif %}
And this is the result :
