cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
lee-martin
Post Prodigy
Post Prodigy

Fetchxml Filter on an entity list

Hi

 

I want to filter an entity list. However I need the filter to link to another entity (there is no lookup), and then to a third entity after that.

 

Is this possible to do?

6 REPLIES 6
Anonymous
Not applicable

Hi @lee-martin  ,

In order for this to work, the linked entities must be connected via relationship.

For example if i have this structure  Accounts > Contacts > Opportunities and i want to list all open Opportunities for the Account via fetch xml , i need to use to lookup field (came from relationship) in order to do that.

 

ref this link https://community.dynamics.com/crm/f/microsoft-dynamics-crm-forum/143038/fetchxml-linked-entity-with... 

lee-martin
Post Prodigy
Post Prodigy

Thanks @Anonymous 

Is there no chance of doing it (even if another way) if the entity isn't linked?

 

Thanks

Lee

Anonymous
Not applicable

Can you please give an example?  like filter entity B based on a text field in entity A ? 

lee-martin
Post Prodigy
Post Prodigy

Contact table linked to Teams table

Country table (not linked to Teams, but has a common field of "Short name" which can be compared)

 

I have the contact, and so need to get the Team from the contact (which is linked). I then need to use the Team "Short name" field, and match it with the "short name" field in Country.

 

This is a legacy system and I don't think creating the link between Team and Country would be possible.

Anonymous
Not applicable

@lee-martin  is that a close representation to what your tables looks like ?

 

Manar_0-1638140728459.png

 

lee-martin
Post Prodigy
Post Prodigy

Yes it is

Helpful resources

Announcements
Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

MPP IDEAS updated 768x460.png

Ideas

Discover ideas and concepts from users like you for how to use Power Pages and take your work to the next level.

Top Solution Authors
Users online (4,572)