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

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

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

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

Yes it is

Helpful resources

Announcements
PA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.

Microsoft Build 768x460.png

Microsoft Build is May 24-26. Have you registered yet?

Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.

May UG Leader Call Carousel 768x460.png

What difference can a User Group make for you?

At the monthly call, connect with other leaders and find out how community makes your experience even better.

Users online (3,157)