web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

How to forloop the entity on D365 portal

(0) ShareShare
ReportReport
Posted on by

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

I have the same question (0)
  • Aric Levin - MVP Profile Picture
    30,190 Moderator on at

    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.

  • Verified answer
    Arpit Shrivastava Profile Picture
    7,518 User Group Leader on at

    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

  • Community Member Profile Picture
    on at

    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
    7,518 User Group Leader on at

    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
    on at

    Hi Arpit

    Thanks,

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

  • Community Member Profile Picture
    on at

    your mean the entity need be added in portal?

    but i can not find where to do this.

  • Community Member Profile Picture
    on at

    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
    on at

    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
    on at

    Thanks,

    I am lost a important step:

    Add role to Web Roles.

    after this setting, it is right to show.

  • Verified answer
    Community Member Profile Picture
    on at

    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

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
SA-08121319-0 Profile Picture

SA-08121319-0 4

#1
Calum MacFarlane Profile Picture

Calum MacFarlane 4

#3
Alex Fun Wei Jie Profile Picture

Alex Fun Wei Jie 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans