Skip to main content

Notifications

Announcements

No record found.

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>";

  • LeoAlt Profile Picture
    16,331 Moderator on at
    RE: how to addCustomefilter to multiple linked entities

    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

🌸 Community Spring Festival 2025 Challenge Winners! 🌸

Congratulations to all our community participants!

Adis Hodzic – Community Spotlight

We are honored to recognize Adis Hodzic as our May 2025 Community…

Kudos to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
Daivat Vartak (v-9davar) Profile Picture

Daivat Vartak (v-9d... 225 Super User 2025 Season 1

#2
Muhammad Shahzad Shafique Profile Picture

Muhammad Shahzad Sh... 91

#3
Vahid Ghafarpour Profile Picture

Vahid Ghafarpour 78 Super User 2025 Season 1

Overall leaderboard

Product updates

Dynamics 365 release plans