CRM

Jun22
Participant

CRM_Association Result + Pagination

Hello Community,

Hope someone will read this post. Seems everyone is not helping! Even hubspot support is muted about my post no chance I think, Hoping someone has a good heart and willing to give a reply and God bless you.!

Right now, I was hoping how can I achieve to add a pagination base on the code result below (table output). Need reference and tips. Thanks!

 {% set company_deals = crm_associations(associated_companies.results[0].id, 'HUBSPOT_DEFINED', 6, "limit=10&offset=0&order=-createdate", 'dealname,amount,dealstage,createdate,closedate') %}

<tbody>
        {% if ticket_array|length > 0 %} 
        {% for deal in ticket_array %}
        {% set membership_contact = crm_object('contact', request.contact.contact_vid, 'firstname,lastname') %}
        {% if deal.source_type != "CHAT" and deal.source_type != "Support Automation" and deal.source_type != "Internal"
        and deal.source_type != "Community" and deal.source_type != "PS" and deal.source_type != "Chatter"%}
        <tr scope="row">
          <td data-label="DEAL NAME" class="gray-cell">
             <a href="https://app.hubspot.com/contacts/7475627/deal/{{deal.id}}" target="_blank">{{ deal.dealname }}</a>
          </td>  
        {% if deal.dealstage == "1a4e48ef-e214-468c-9d51-fe5547933286"%}
          <td data-label="DEAL STAGE">
           <span class="badge badge-pill p1">Prospecting</span>
          </td>
         {% elif deal.dealstage == "72c0e000-d43b-4ed9-a762-fd59723134bc"%}
          <td data-label="DEAL STAGE">
           <span class="badge badge-pill p2">Qualifying</span>
          </td>
         {% elif deal.dealstage == "79795644-3df1-4060-afbe-560f26a8aaad"%}
          <td data-label="DEAL STAGE">
           <span class="badge badge-pill p3">Developing Solution</span>
          </td>
         {% elif deal.dealstage == "3e872ef2-3101-4dbf-a85e-417396969466"%}
          <td data-label="DEAL STAGE">
           <span class="badge badge-pill p4">Negotiating</span>
          </td>
         {% elif deal.dealstage == "0a14ba1e-dacd-4ce5-8ddf-ead56613e16b"%}
          <td data-label="DEAL STAGE">
           <span class="badge badge-pill p5">Won</span>
          </td>
         {% else %}
          <td data-label="DEAL STAGE">
            {{deal.dealstage}}
          </td>
         {% endif %}  
         <td data-label="CREATE DATE" class="gray-cell">{{ deal.createdate }}</td>    
         <td id="idProperty" data-label="DEAL OWNER"class="gray-cell"> {{ membership_contact.firstname }} {{ membership_contact.lastname }} </td>
         <td data-label="AMOUNT" class="gray-cell">{{deal.amount}}</td> 
         <td data-label="CLOSE DATE" class="gray-cell">{{ deal.closedate }}</td>  
        </tr>
    {% endif %}
    {% endfor %}
    {% endif %}
    </tbody>



0 Upvotes
2 Replies 2
danmoyle
Most Valuable Member | Elite Partner
Most Valuable Member | Elite Partner

CRM_Association Result + Pagination

@Jun22 might I suggest asking dev questions in the developers channel? I know for me, a standard user, code is not in my wheelhouse. So while I've read your post and I want to be helpful, I don't dabble in code. I'm also wondering what you're trying to achieve. Perhaps there's another solution for what you're asking. If you give more details, someone may have an answer. Because we really are all here to help each other. 

 

Did my answer help? Please "mark as a solution" to help others find answers. Plus I really appreciate it!


Dan Moyle

HubSpot Advisor

LearningOps | Impulse Creative

emailAddress
dan@impulsecreative.com
website
https://impulsecreative.com/
Jun22
Participant

CRM_Association Result + Pagination

Hey Dan, 

Thanks for the reply.   I uploaded a photo to clear what I am trying to achieve sir.  Simply just wanted to add pagination.  The result below is generated through (crm_association).  

 {% set company_deals = crm_associations(associated_companies.results[0].id, 'HUBSPOT_DEFINED', 6, "limit=10&offset=0&order=-createdate", 'dealname,amount,dealstage,createdate,closedate') %}


I would love to see if anyone knows how to deal with this one im totally new to hubspot so was wondering if you can tagged someone good in hubspot coding sir ? 


ScreenShot Tool -20221107215848.png

0 Upvotes