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 :
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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
Tom_Gioielli Profile Picture

Tom_Gioielli 73 Super User 2025 Season 2

#2
Gerardo Rentería García Profile Picture

Gerardo Rentería Ga... 43 Most Valuable Professional

#3
Daniyal Khaleel Profile Picture

Daniyal Khaleel 32 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans