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

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Customer experience | Sales, Customer Insights,...
Unanswered

how to addCustomefilter to multiple linked entities

(0) ShareShare
ReportReport
Posted on by 645

I have xml with multiple linked entities and I need to populate my custom view with the results, I read about it online but not sure what is the best solution. how I do that? 
 Xrm.Page.getControl("associatedproduct").addCustomFilter(fetchXml) - doesn't work.


 "<fetch version='1.0' output-format='xml-platform' mapping='logical' distinct='true'>"+
                "<entity name = 'product'>"+
                "<attribute name='name'/>"+
                "<attribute name='productnumber'/>"+
                "<attribute name='subjectid'/>"+
               "<attribute name='statecode'/>"+
                "<attribute name='productid'/>"+
               "<order attribute='productnumber' descending='false'/>"+
                "<link-entity name='pricelistitem' from='productid' to='productid' alias='ae'>"+
                    "<link-entity name='pricelevel' from='pricelevelid' to='pricelevelid' alias='af'>"+
                        "<link-entity name='entit' from='accountpricelistid' to='pricelevelid' alias='ag'>"+
                           "<link-entity name='account' from='accountid' to='accountid' alias='ah'>"+
                                "<filter type='and'>"+
                                    "<condition attribute='accountid' operator='eq' uitype='account' value='" + accId+"' />"+
                                "</filter>"+
                            "</link-entity>"+
                        "</link-entity>"+
                    "</link-entity>"+
                "</link-entity>"+
        "</entity>"+
        "</fetch>";

I have the same question (0)
  • LeoAlt Profile Picture
    16,331 Moderator on at

    Hi partner,

    Please check the following points.

    1.Can this fetch xml get the correct result? Did you try it with advanced find or other tools?

    Please check if this entity exists.

    pastedimage1590374742558v1.png

    And you could add your fetchxml to toolbox Fetch XML Builder to check if the fetch xml is correct and could get the result you want.

    2.What's the lookup field you want to add this fetch xml? Normal look up field or "Party List"?

    Best Regards,

    Leo

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 Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the April Top 10 Community Leaders

These are the community rock stars!

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
Muhammad Shahzad Shafique Profile Picture

Muhammad Shahzad Sh... 69 Most Valuable Professional

#2
ManoVerse Profile Picture

ManoVerse 55 Super User 2026 Season 1

#3
11manish Profile Picture

11manish 37

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans