Querying Many to Many Relationships in Microsoft Dynamics CRM

Visit Website View Our Posts

Entity relationships represent how data is related to each other within the Microsoft Dynamics CRM platform. Microsoft Dynamics CRM makes it easy to create custom entities with no programming experience and link these entities with a variety of relationships. One of the most powerful relationship in CRM is the Many to Many (N:N), that refers to the relationship between two entities A and B in which A may contain a parent row for which there are many children in B and vice versa. For example, think of A as Authors, and B as Books. An Author can write several Books, and a Book can be written by several Authors.

One of the biggest challenges is how to query the data with these relationships, but now it’s easier than ever with the latest version of Microsoft Dynamics CRM with an Advanced Find. Here’s how…

First & foremost, make sure the relationship is marked as Searchable:




When you design your Advanced Find, you can now include this relationship in your search:


Untitled-2BONUS! If you have a third party provide creating and managing your custom reports, you can click the Download Fetch XML button on the Advanced Find and capture the XML code linked to your data. This is a great way for a savvy CRM user to ensure their developers are always using the correct data sets when building reports and dashboards.




Try it for yourself!  Please feel free to reach out to me with any questions.

Beringer Associates is always here to provide expert knowledge in topics like these. Beringer Associates a leading Microsoft Gold Certified Partner specializing in Microsoft Dynamics CRM and CRM for Distribution. We also provide expert managed IT services, cloud based computing and unified communication systems.

2 thoughts on “Querying Many to Many Relationships in Microsoft Dynamics CRM”

  1. Hi,

    Thanks for the great post, how do you add columns from the entities in advanced find for many to many relationships as I'm looking to export as FetchXML and build reports in SSRS.

    Many Thanks


  2. I'm confused. What part of searching across a many to many relationship can you do in CRM 2015 that you couldn't do in earlier versions, say 2011? I know you can now make the relationship non-searchable (at least for custom many to many relationships), but from what I can see, you could always search them in previous versions. Can you clarify please? Thanks.

Comments are closed.

Show Buttons
Hide Buttons