Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

CRM 2016 - Custom Ribbon Button to open N-N association window

(0) ShareShare
ReportReport
Posted on by 395

Dear community,

I'm wondering if there is any way to implement a custom ribbon button on a form (e.g. of entity A) to open the native N-N association window (lets assume I have a N-N relationship from Entity A to Entity B).

Practically that means I want to to do via JS what the native "+"-Button on N-N subgrids can do by default.

Any ideas? Maybe also a supported idea?

Im running CRM 2016 OnPrem.

Thanks a lot

Regards

John

*This post is locked for comments

  • Verified answer
    Mahendar Pal Profile Picture
    Mahendar Pal 45,095 on at
    RE: CRM 2016 - Custom Ribbon Button to open N-N association window

    Hi,

    There is way to open form for n:n relationship as intersect entity is hidden, the only option to use n:n associated view or if you have multiple record need to be associated then use n:n import/export option. Otherwise you will need to develped something your own which won't be an easy option.

  • John Brase Profile Picture
    John Brase 395 on at
    RE: CRM 2016 - Custom Ribbon Button to open N-N association window

    I dont need to import the data. User just needs to select which records to associate to that record in the form he is currently navigating. Can't let him use the ToolBox.

  • Suggested answer
    Mahendar Pal Profile Picture
    Mahendar Pal 45,095 on at
    RE: CRM 2016 - Custom Ribbon Button to open N-N association window

    How about using n:n import options from XrmToolBox if you are not interested in any form, github.com/.../Manage-NN-relationships

  • John Brase Profile Picture
    John Brase 395 on at
    RE: CRM 2016 - Custom Ribbon Button to open N-N association window

    I don't really wish a specific form, just the native search window which popups when I natively try to make an n-n association... The reason I need that is that it saves me a lot of custom JS and plugin code, if I achieve that. I want to actually use that n-n association to generate a bunch of unrelated data (user will not be really aware of that relationship, thats why i dont want to make that subgrid visible on his form). That association is just going to assist me on that. I was actually thinking that it is probably not possible, that native pop up window looks like some very dynamic stuff to me...

  • Suggested answer
    Mahendar Pal Profile Picture
    Mahendar Pal 45,095 on at
    RE: CRM 2016 - Custom Ribbon Button to open N-N association window

    Hi,

    There is no interface for n:n relationship as the intersect entity is hidden, so you can do association using associated view only or through code using both entity ids.

    Why you want do that is there any specific reason while you can access out ofthebox associated view ?? Or if you want to get a form for your n:n relationship then you can setup manual n:n relationship, create one intersect entity where you can create 1:n relationship from both the entities and can open this entity form using js.

    Please let me know if my understanding is not correct.

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

Daivat Vartak – Community Spotlight

We are honored to recognize Daivat Vartak as our March 2025 Community…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Kudos to the February Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,516 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,409 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans