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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Pages / Filter XML query with ...
Power Pages
Answered

Filter XML query with linked entity not returning data

(0) ShareShare
ReportReport
Posted on by 21

Hi,

I have a custom table that has a field referencing the system Account table:
Table: Client Company
Name: ccc9_client_company
       Field : Client Account
       Name: ccc9_client_account
       Data type: Unique Identifier

 

        Field: Name
        Name: ccc9_client_account_name
         Data type: String


So, for each Account defined, there will be an entry in the Client Company table for the account.

 

Now, when a logged in user views a page, I want to show the Client Company details for the Account assigned to the current logged in user.

So far, I have tried a number of queries that all have not worked:

{% assign accountdetails = entities['account'][user.parentcustomerid.id] %}
{% fetchxml ccc9_client_company %}
<fetch mapping="logical" distinct="true">
  <entity name="ccc9_client_company">
    <all-attributes/>
   
    <link-entity name="account" from="accountid" to="ccc9_client_account" visible="false" link-type="outer" alias="client_account_details_alias">
    <all-attributes/>
    </link-entity>
  </entity>
</fetch>{% endfetchxml %} 

{{ccc9_client_company.results['client_account_details_alias.ccc9_client_account_name']}}

 

 

The returned page is blank.
Any help / advise appreciated.

Thanks in advance,

Categories:
I have the same question (0)
  • Verified answer
    davespat73 Profile Picture
    21 on at

    For anyone new to this - I found a handy tool to help debug these queries - called XrmToolBox and then you have to add the FetchXmlTester and FetchXML Builder plugins.

    With that I managed to generate the correct fetchxml.

     

     

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Pages

#1
Valantis Profile Picture

Valantis 59

#2
11manish Profile Picture

11manish 51

#3
omkarsupreme Profile Picture

omkarsupreme 27

Last 30 days Overall leaderboard