Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics CRM (Archived)

How to forloop the entity on D365 portal

Posted on by Microsoft Employee

the liquid code like this:

{% assign showtext = "test" %}

{% assign entityObjs = entities['entity name'] %}

{% if entityObjs %}

<p>{{ showtext | prepend:'123' }}</p>

{% for entityObj in entityObjs %}

<p>{{ showtext }}</p>

{% endfor %}

{% endif %}

Portal info only show:

123test

in this code, i can get entityObjs, but why i can not forloop the entity item?

*This post is locked for comments

  • Verified answer
    Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: How to forloop the entity on D365 portal

    Summary:

    First of all, Please make sure you are having proper Entity Permisaions enabled for the Entity in order to use it in Fetch xml

    Portals -> Security -> Entity Permissions

    Add permissions

    Entity Name: My using entity name

    Website: my portal name

    Scope: Global

    Privileges: Read

    Web Roles: Add role

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: How to forloop the entity on D365 portal

    Thanks,

    I am lost a important step:

    Add role to Web Roles.

    after this setting, it is right to show.

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: How to forloop the entity on D365 portal

    I am set the bellow path

    Portals -> Security -> Entity Permissions

    Add permissions

    Entity Name: My using entity name

    Website: my portal name

    Scope: Global

    Privileges: Read

    But still not right to show in portal.

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: How to forloop the entity on D365 portal

    i'm find out you reply on another's question,

    community.dynamics.com/.../224903

    I am having 'Global' entity permissions on Contact Entity. Any suggestion ?

    Previously It was working fine. Started getting this issue from last 2-3 days.

    Thanks in advance.

    the key : 'Global' entity permissions on Contact Entity

    how to do this?

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: How to forloop the entity on D365 portal

    your mean the entity need be added in portal?

    but i can not find where to do this.

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: How to forloop the entity on D365 portal

    Hi Arpit

    Thanks,

    ths adxstudio no reference to how to forloop entities in it's example.

  • Verified answer
    Arpit Shrivastava Profile Picture
    Arpit Shrivastava 7,518 User Group Leader on at
    RE: How to forloop the entity on D365 portal

    Please make sure you are having proper Entity Permisaions enabled for the Entity in order to use it in Fetch xml

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: How to forloop the entity on D365 portal

    Hi Aric

    I follow you suggestion, but i still not right to show.

    my Code like this:

    <div class="container">

    {% fetchxml my_query %}

    <fetch version="1.0" mapping="logical">

    <entity name="Entity Name">

    <attribute name="title" />

    </entity>

    </fetch>

    {% endfetchxml %}

    {% for result in my_query.results.entities %}

    <div name="content" style="padding: 15px 30px 0 0; clear: both;">

    <h2> {{ result.title | escape }} </h2>

    <div class="clear">

    </div>

    </div>

    {% endfor %}

    </div>

  • Verified answer
    Arpit Shrivastava Profile Picture
    Arpit Shrivastava 7,518 User Group Leader on at
    RE: How to forloop the entity on D365 portal

    Hope this help.

    https://community.adxstudio.com/products/adxstudio-portals/documentation/configuration-guide/liquid-templates/objects/forloop/

    http://arpitmscrmhunt.blogspot.in/2017/01/how-to-use-fetch-xml-in-adxstudio.html

    If my answer helped to resolve your issue, kindly verify it by clicking 'Yes'. It would be helpful to the other community members seeking to resolve a similar issue.


    Cheers
    Arpit
    https://arpitmscrmhunt.blogspot.in

  • Aric Levin Profile Picture
    Aric Levin 30,188 on at
    RE: How to forloop the entity on D365 portal

    Trying using entitylist, entityview or fetchxml.

    The following links should give you examples:

    dyn365apps.com/.../dynamics-365-portals-liquid-templates-part-2-retrieve-data

    dyn365apps.com/.../dynamics-365-portals-liquid-templates-part-3-retrieve-data-using-fetchxml

    colinvermander.com/.../liquid-templates

    Hope this helps.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,269 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,198 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans