web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Many To Many Relationships

(0) ShareShare
ReportReport
Posted on by

I am trying to set up a many to many relationship between the contact entity and a custom entity called Associations.

I want a contact to be associated with a multiple associations. I want an association to contain multiple contacts.

I created a custom entity called Association.

On the Associations entity I created a lookup field for Target Record Type Contact and placed that field on the Association form.

I then went into the Contact form and created a new looped field for Target Record Type Association and placed that field on the Contact form.

By using this approach I am not seeing all of the Associations records associated with a given contact record:

Many people mention that to set up a Many to Many relationship between two entities it really requires a third entity.  Is that really the case?

Thanks.


Rick Bellefond
RB Data Services
www.rbdata.com

*This post is locked for comments

I have the same question (0)
  • Community Member Profile Picture
    on at
    RE: Many To Many Relationships

    @Anna,

    Go to Form Customization/"Form Editor".

    Go to the "Insert"-tab.

    Click on the "Sub-Grid" button in the displayed Ribbon-bar (I'm looking at CRM2016 as I typre this).

    A pop-up form is displayed.  Enter the details appropriate to you application & entities. ;)

  • Community Member Profile Picture
    on at
    RE: Many To Many Relationships

    Hi Vijay

    How did you display the sub-grid on the main form with the many to many N:N relationship?  

    We have the following situation:

    Separate entity to hold credit details

    Credit entity linked to account - N:N

    1 account can have multiple credit checks over time (only ever 1 active one)

    1 account has 1 ABN (the link to the credit check)

    1 credit check can be linked to multiple accounts (a big customer may have multiple accounts but all have the same ABN)

    We want to display a sub-grid on the account of the credit checks and can not work out how to do it.

    Any help would be appreciated.

    Thanks

    Anna

  • Suggested answer
    Community Member Profile Picture
    on at
    RE: Many To Many Relationships

    Hi  Rick Bellefond,

    could you please look at this places for given to useful information

    community.dynamics.com/.../displays-a-many-to-many-relationship-in-microsoft-dynamics-crm-2011.aspx

    social.microsoft.com/.../many-to-many-relationships

  • Verified answer
    Vijay Waghmare Profile Picture
    on at
    RE: Many To Many Relationships

    Hi Rick,

    As mentioned by community members you can make use of N:N relationship between contact and association entity.

    Once you create such relation it gives you an option to show look field of one entity on another and vice versa.

    Whenever you create any N:N relationship, CRM platform internally creates an intermediate table(as you are referring third table here). This table is used to hold the references from both the entities.

    Once you are done with setting up N:N relationship, you can refer left hand navigation to see all related records of other entity or you can create a sub-grid to show it on main form.

    Hope this clarifies.

    Thanks,

    Vijay

  • Verified answer
    AFTAB HUSSAIN Profile Picture
    on at
  • Verified answer
    GL-23071537-0 Profile Picture
    on at
    Re: Many To Many Relationships

    Also here is a video on how to create a N:N using a separate entity as I discussed above.

    community.dynamics.com/.../many-to-many-relationships-in-dynamics-crm-2011.aspx

  • Verified answer
    GL-23071537-0 Profile Picture
    on at
    Re: Many To Many Relationships

    Hi Rick,

    You can create a many-to-many relationship, but not using lookups on the records.  To do this, you can go to the Customizations area under either the Association or the Contact entity.  Down under fields you will see 3 relationship types, 1:N, N:1, and N:N.  It is under the N:N area that you would create the many to many relationship between the two entities.

    Let me know if you are not able to find it.

    Some things to think about as to whether you want to use N:N relationship.  Do you want to store additional attributes about this relationship, such as a the start date and/or end date, a description, a title, etc.  If so, you may want to create a separate entity for this N:N relationship or use Connections.  Also do you want to possibly want to create this relationship with workflow?  A direct N:N relationship cannot be created with workflow.  

    Lastly, there are also some differences in the way you report on N:N as discussed in this blog.

    gustafwesterlund.blogspot.com/.../advanced-find-and-many-to-many-nn-in.html

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Abhilash Warrier – Community Spotlight

We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
HR-09070029-0 Profile Picture

HR-09070029-0 2

#2
ED-30091530-0 Profile Picture

ED-30091530-0 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans