Contact Us Today!

Querying Many to Many relationships in Microsoft Dynamics CRM

Querying Many to Many relationships in Microsoft Dynamics CRM

Entity relationships represent how data is related to each other within the Microsoft Dynamics CRM platform. Microsoft Dynamics CRM make 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:


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



Rob is the CTO of Beringer Technology Group, and focuses his efforts on software development, cloud engineering, team mentoring and strategic technical direction. Rob has worked with Beringer since 2005, and has influenced every department from Development, Security, Implementation, Support and Sales. Rob graduated with his MBA from Rowan University in 2012, earned his Bachelors of Computer Science in 1997, and is current with several Microsoft technical certifications. Rob is very active, and loves to mountain bike, weight train, cook and hike with his dog pack.