cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
lee-martin
Helper II
Helper II

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
Manar
Resolver IV
Resolver IV

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
Helper II
Helper II

Thanks @Manar 

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

 

Thanks

Lee

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

lee-martin
Helper II
Helper II

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.

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

 

Manar_0-1638140728459.png

 

lee-martin
Helper II
Helper II

Yes it is

Helpful resources

Announcements
2022 Release Wave 1 760x460.png

2022 Release Wave 1 Plan

Power Platform release plan for the 2022 release wave 1 describes all new features releasing from April 2022 through September 2022.

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Users online (1,839)