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

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
Super User
Super User

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

Thank you,
Manar

If you like this post, give it aThumbs Up. Where it solved your query, mark it as a SOLUTION so it can help other people!
lee-martin
Post Patron
Post Patron

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 ? 

Thank you,
Manar

If you like this post, give it aThumbs Up. Where it solved your query, mark it as a SOLUTION so it can help other people!
lee-martin
Post Patron
Post Patron

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

 

Thank you,
Manar

If you like this post, give it aThumbs Up. Where it solved your query, mark it as a SOLUTION so it can help other people!
lee-martin
Post Patron
Post Patron

Yes it is

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

365 EduCon 768x460.png

Microsoft 365 EduCon

Join us for two optional days of workshops and a 3-day conference, you can choose from over 130 sessions in multiple tracks and 25 workshops.

Top Solution Authors
Users online (2,872)