Beringer Associates Technology Blog

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:

 

Untitled-1

 

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

 

Untitled-2

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.

 

Untitled-3

 

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

Share