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 (Archive)
Suggested answer

Fetchxml return no record in liquid templates

(0) ShareShare
ReportReport
Posted on by 3,610

I have below fetchxml query that is running fine  Advanced Find / FetchXML Builder. However, in liquid templates, same query is not returning anything.

{​​​​​% fetchxml abc_vat_query %}​​​​​
<fetch version="1.0" output-format="xml-platform" mapping="logical" distinct="true">
<entity name="new_vatgroup">
<attribute name="new_vatgroupid" />
<attribute name="new_name" />
<attribute name="createdon" />
<order attribute="new_name" descending="false" />
<link-entity name="msdyn_organizationalunit" from="msdyn_organizationalunitid" to="new_organisationalunit" link-type="inner" alias="as">
<link-entity name="contact" from="new_resourcingunit" to="msdyn_organizationalunitid" link-type="inner" alias="at">
<filter type="and">
<condition attribute="contactid" operator="eq" value="{{user.id}}" />
</filter>
</link-entity>
</link-entity>
</entity>
</fetch>
{​​​​​% endfetchxml %}​​​​​{
"totalcount": "{{ abc_vat_query.results.total_record_count }}"
}

I'm system admin and have due entity permissions as well as well web roles associated to my user. Can anyone please assist in this regard?

  • Suggested answer
    Tim Partridge2 Profile Picture
    35 on at
    RE: Fetchxml return no record in liquid templates

    Maybe you're not logged in? Your filter is using {{user.id}}. You can output {{abc_vat_query.xml}} to see the rendered XML. Then you can execute your xml using the FetchXML tester plugin for XrmToolbox. It might give you clues. If the fetch returns results, then you know it must be due to entity permissions or web roles.

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

Community Spotlight of the Month

Kudos to Mohamed Amine Mahmoudi!

Blog subscriptions now enabled!

Follow your favorite blogs

TechTalk: How Dataverse and Microsoft Fabric powers ...

Explore the latest advancements in data export and integration within ...

Leaderboard > 🔒Ι Microsoft Dynamics CRM (Archived)

Featured topics

Product updates

Dynamics 365 release plans