Customer Engagement & Dynamics CRM Forum

Expand all | Collapse all

Liquid template to show entitylist inside the web pages

  • 1.  Liquid template to show entitylist inside the web pages

    GOLD CONTRIBUTOR
    Posted Aug 28, 2019 01:41 PM
    ​Hi All,

    I am trying to show the portal web page with the Liquid template framework.

    I using below code:

    <div class="container">
      <div class="page-heading">
        {% include 'breadcrumbs' %}
      </div>
      {% include 'page_header' %}
      {% include 'page_copy' %}

      {% entitylist key: page.adx_entitylist.id %}
        {% entityview logical_name: 'new_product' name:'Vegetables' %}
         {% for item in entityview.records %}
            <item>
              <div name="content" style="padding: 15px 30px 0 0;">
                <h2> {{ item.new_name }} </h2>
                <h3> {{ item.new_description }} </h3>
              <div name="main-content" style="margin-left: 300px; max-width: 800px;">
               <p> {{ item.new_price}} </p>
               <br />
              </div>
            </item>
          {% endfor %}
        {% endentityview %}
      {% endentitylist %}
    </div>

    unfortunately it is not working. I have defined the entity list for the web page but page does not show entity list.

    Anybody knows what I am missing here?

    Thanks

    Regards

    ------------------------------
    Jeebo Mathews
    Agricorp
    ------------------------------
    Conference-CRMUG_200x200


  • 2.  RE: Liquid template to show entitylist inside the web pages

    D365UG/CRMUG ALL STAR
    Posted Aug 29, 2019 08:09 AM
    Hi Jeebo

    If you are surfacing CDS/Dynamics 365 data via Liquid in a Portal you need to setup Entity permission for those particular entities, or else the data will not show up.

    Even if you want to show for unauthenticated users, you need to create the entity permission and associate it to the anonymous user's web role.

    https://docs.microsoft.com/en-us/dynamics365/customer-engagement/portals/assign-entity-permissions

    https://docs.microsoft.com/en-us/learn/modules/secure-common-data-service-data-dynamics-365/2-cds-data-entity-permissions


    ------------------------------
    Nick Doelman
    Microsoft MVP
    Dynamics 365 Specialist
    Nick Doelman Co.
    ottawa ON
    ------------------------------

    Conference-CRMUG_200x200


If you've found this thread useful, dive deeper into User Group community content by role