How to use Fetch XML in ADXStudio Liquid Template

Liquid is an open-source template language integrated into Adxstudio Portals. It can be used add dynamic content to pages, and to create a wide variety of custom templates.

You can learn more about Liquid Template from ADXStudio Community:

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

In this post I would like to explain, how we can use Fetch XML to retrieve data from CRM in Liquid Template.

  1. {% fetchxml my_query %}
  2.   <fetch version=\”1.0\” mapping=\”logical\”>
  3.   <!– Write FetchXML here, use Liquid in here if you want, to build XML dynamically. –>
  4.   </fetch>
  5. {% endfetchxml %}
  6.  
  7. {{ my_query.xml | escape }}
  8. {{ my_query.results.total_record_count }}
  9. {{ my_query.results.more_records }}
  10. {{ my_query.results.paging_cookie | escape }}
  11. {% for result in my_query.results.entities %}
  12.   {{ result.id | escape }}
  13. {% endfor %}
  14.  
  15. <!– You can also filter results by Entity Permissions –>
  16. {% fetchxml secure_query enable_entity_permissions: true, right: \’read\’ %}
  17. {% endfetchxml %}




Note – You must have appropriate Entity Permissions for data to be correctly retrieved. 
For example if you retrieving Contact Entity data using Liquid Template Fetch XML then you must have appropriate Entity Permissions on Contact Entity. (Contact, Account, Parent, Global).

Published by arpitpowerguide

My name is Arpit Shrivastava, who is a Microsoft MVP in the Business Applications category. I am a Microsoft Dynamics 365 and Power Platform enthusiast person who is having a passion for researching and learning new things and acquiring immense knowledge. I am providing consistent help, support, and sharing my knowledge through various Social Media Channels along with my Personal Blog, Microsoft Community, conducting online training and attending various 365 Saturday Events worldwide and sharing the best Solutions to the readers helping them achieve their goals and objectives in Customer Relationship Space.

One thought on “How to use Fetch XML in ADXStudio Liquid Template

  1. Special thanks to (hackingsetting50@gmail.com) for exposing my cheating husband. Right with me i got a lot of evidences and proofs that shows that my husband is a fuck boy and as well a cheater ranging from his text messages, call logs, whats-app messages, deleted messages and many more, All thanks to (hackingsetting50@gmail.com), if not for him i will never know what has been going on for a long time. Contact him now and thank me later.

    Like

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: