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

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Customer experience | Sales, Customer Insights,...
Answered

Create nested subgrid for a n:n relationship

(0) ShareShare
ReportReport
Posted on by

Hi,

I've created some custom entities (A & B for exemple) with N:N relationship between them to bypass some limitation I encountered in the Product Entity.

I created a subgrid view of  A in my quote form and I want to show a nested subgrid of B in this subgrid view. I have an issue to define the parentID of the nested subgrid because I have no lookup between my two entities.

So I wondering if  I can create a lookup between A & B without loosing the N:N relationship or if there is another way to create a link between my entities ?

Thank you for your support, 

Best Regards, 

Alexandre

I have the same question (0)
  • Verified answer
    Wahaj Rashid Profile Picture
    11,321 on at

    Hi,

    Thank you for your query.

    There are two ways of creating N:N Relationships:

    1. Implicit: Use the N:N relationship tab in one of the entities customization (which you did). This will create a resolving entity, however you won't have direct access to it.
    2. Explicit: Create a custom entity which will have two N:1 relations (lookups), one for Entity A and other for Entity B.

    The second approach is used when you want a form for your resolving entity or if you need to capture additional information when associating the two records.

    In your scenario, second approach should work.

    To summarize, create an entity called A_B (example), add a lookup to A and another to B. Fill the name field (primary field) using a Business rule (so the users do not have to fill it manually). Then create your nested subgrids using the Lookups on this new entity.

    Let me know if you need further clarification.

    Best,

    Wahaj

  • Community Member Profile Picture
    on at

    Hi Wahaj,

    Thank you for your response.

    I tried to follow your explaination and I'm stuck at the nested subgrid creation. 

    I've create A, B and A_B entities. then I've create lookups N:1 to A and B (picture below)

    image_5F00_2020_2D00_12_2D00_15_5F00_152200.png

    Then I added A and B lookups in the A_B form

    image_5F00_2020_2D00_12_2D00_15_5F00_152727.png

    But after that I don't understand what I have to do. I've try to create a nested grid in Entity A, B and A_B and I can't because I still didn't have the parentID for the nestedgrid.

    And I have the same problem whan I link another entity.

    I'm sure that I made a mistake but I don't see where.

    Thanks for your help.

    Best,

    Alexandre

  • Community Member Profile Picture
    on at

    Hi Wahaj,

    I was lost yesterday but I'm better now :-) So, I understand correctly your solution and it's seems that it's working to resolve my issue.

    Thank you very much for your time and explanation.

    I'll keep you posted when everything will work.

    Thank you again.

    Best,

    Alexandre

  • Suggested answer
    LuHao Profile Picture
    40,892 on at

    Hi Alexandre,

    The nested subgrid is only available to the 1:N relationship in the 1:N sub-grid, but is not available to the N:N sub-grid, which is by design.

    For example, there are three entities, Grandparent, Parent, and Children. The relationship between them is 1:N and 1:N, so we can add a Parent sub-grid on the Grandparent form, and configure the nested subgrid to display the Children of each Parent.

    Therefore, it is impossible to achieve your needs through nested subgrid.

    What I can think of is to add a button to the N:N relationship sub-grid. This button will appear when only one record is selected. The click event is to display related records of the selected record in a web resource on the form.

    In short, there is no coding-free solution.

  • urklnme Profile Picture
    439 on at

    please post the full details of what you did to  make this work.  :)

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…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
Tom_Gioielli Profile Picture

Tom_Gioielli 170 Super User 2025 Season 2

#2
#ManoVerse Profile Picture

#ManoVerse 61

#3
Gerardo Rentería García Profile Picture

Gerardo Rentería Ga... 52 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans