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

Out of Box N:N Entity

(0) ShareShare
ReportReport
Posted on by 105

Hi,

I have N:N oob relationship between Entity A and Entity B.

Adding records for an N:N entity requires too many clicks.

User has to first click on Add Existing -> New Record -> then they get a pop up "Leave this page."

and even after successful record creation - > User has to search for the record and add it to the subgrid.

pastedimage1614659233617v1.png

Is there any way we can simplify this process of adding records.

Please Note: We have to use the main form and not the quick create as we have to do some validations.

Kindly help.

I have the same question (0)
  • SharonP Profile Picture
    105 on at

    @Mehdi El Amri

  • Verified answer
    LuHao Profile Picture
    40,892 on at

    Hi SharonP,

    With the +New button of the sub-grid, we can create records directly and add them to the sub-grid.

    However, by default, the +New button of a sub-grid will only appear in the 1:N sub-grid.

    So we need to customize the command of the +New button of the sub-grid to make it appear in the N:N sub-grid.

    Create a solution and add the entity of the sub-grid in it, then open the solution in the ribbon workbench.

    In the ribbon workbench, customize command of Add New {0} button.

    pastedimage1614668208323v2.png

    Add new display rule, add OrRule, then add RelationshiptTypeRule in its two steps, one is OneToMany, the other is ManyToMany.

    pastedimage1614667596665v2.png

    pastedimage1614667650388v3.png

    Remove Mscrm.ShowForOneToManyGrids from Mscrm.AddNewRecordFromSubGridStandard commands.

    pastedimage1614667761951v4.png

    Publish.

    Then we can see +New button of the sub-grid, and we do not need to search for the new record, the new record will appear in the sub-grid automatically. 

    pastedimage1614667983327v5.png

  • SharonP Profile Picture
    105 on at

    Thanks Lu Hao I was able to achieve the + New button.

  • SharonP Profile Picture
    105 on at

    Hi Hao,

    One weird scenario:

    I have another subgrid in Entity B with 1:N relationship(in your case Test entity). If I add a record in the subgrid also and then try to save and close, the record is not added back to the subgrid. If however, I add the record without any record in the subgid it works. Any idea?

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 81 Super User 2025 Season 2

#2
Gerardo Rentería García Profile Picture

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

#3
#ManoVerse Profile Picture

#ManoVerse 40

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans