Skip to main content
Community site session details

Community site session details

Session Id :
Dynamics 365 Community / Forums / Sales forum / N:N Relationship betwe...
Sales forum

N:N Relationship between Account/Account - How to Display Sub Grids for both Directions?

(0) ShareShare
ReportReport
Posted on by 30

Hi,

I have created a many to many relationship where both entities are Accounts. This is to allow a user the ability to define an existing Account as an End User of another. When viewing the relationship from the End User Account it will show the linked Account record as a Partner. An Account can have any number of End Users, and in turn any number of Partner Accounts.

The relationship appears to be set up correctly and I am seeing the desired grids in the main Navigation panel (shown below).

8345.Many-to-Many.png

However, I am unable to add both a Partner sub grid and End User sub grid to the Account form.

Is this even possible? Or will I need to direct users to the grids in the nav panel?

Thanks

Lee

Categories:
  • Community Member Profile Picture
    on at
    RE: N:N Relationship between Account/Account - How to Display Sub Grids for both Directions?

    Ah, that's a good point that would be unique to your situation.  Having an N:N to account will pre-populate the same account to both fields on a quick create.

    You could clear them both on load with some custom JS?    Otherwise, the Connections may be a better solution depending on your needs.

  • LeeHarris Profile Picture
    30 on at
    RE: N:N Relationship between Account/Account - How to Display Sub Grids for both Directions?

    Hi Chris,

    I attempted to achieve this using a join entity but as this relationship is between Account and Account it caused me issues when trying to populate either the Partner or End User automatically, filling both lookups with the same value.

    For example if I was adding an End User to an existing Account, I would want the form to auto fill Partner Account with the record I was on, and likewise if I was adding a Partner Account I would want the End User to auto set. Instead what was happening was both Partner Account and End User Account were populating with the "parent" record.

  • LeeHarris Profile Picture
    30 on at
    RE: N:N Relationship between Account/Account - How to Display Sub Grids for both Directions?

    Hi Ravi,

    At least I know now that it is not possible to get the sub grids with the single many to many, saves me some time going down a dead end.

    Thanks for the links to Connections, I will look into this as an alternative approach.

  • Community Member Profile Picture
    on at
    RE: N:N Relationship between Account/Account - How to Display Sub Grids for both Directions?

    I don't think you can use sub-grids for N:N, at least as far as I know.

    You might want to consider a N:N Join Entity instead of the out of the box N:N.  There are a number of advantages to this model, including the ability to load the relationships in a sub-grid.

    http://informaquest.com/index.php/2017/04/06/join-entities-in-dynamics-365-and-why-they-are-awesome/ 

  • Verified answer
    RaviKashyap Profile Picture
    55,410 Moderator on at
    RE: N:N Relationship between Account/Account - How to Display Sub Grids for both Directions?

    Hi Lee,

    You won't be able to acheive this by single many to many relationship. You would need separate many to many relationship for End User & Partner.

    Also, I think that connections will suit your requirement better then creating the the many to many relationships.

    www.powerobjects.com/.../record1-or-record2-creating-a-connection-and-how-to-search-for-related-records

    www.powerobjects.com/.../the-great-debate-dynamics-crm-connections-vs-lookups

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

News and Announcements

Now Available: 2025 Release Wave 2

Quick Links

November Spotlight Star - Khushbu Rajvi

Congratulations to a top community star!

Forum Structure Changes Coming on 11/8!

In our never-ending quest to help the Dynamics 365 Community members get answers faster …

Dynamics 365 Community Platform update – Oct 28

Welcome to the next edition of the Community Platform Update. This is a status …

Leaderboard > Sales

Featured topics

Product updates

Dynamics 365 release plans