Skip to main content

Notifications

Announcements

No record found.

Customer experience | Sales, Customer Insights,...
Unanswered

Why associate message is called when I create a record from related tab in a form even if it is a 1:N relationship?

Posted on by 75

Just like I wrote in the subject. Let's say I have a table called "Scaffold". This table has a relationship 1:N with another table called "Position". If I go in the Scaffold's form, navigate through "related" link and click in "new", I can create a new record in the Position's table. My problem is that when I do this, the CRM call the "associate" message, calling both create and update message togheter. So if I have different control in my plugin between create and update, I have many problem when update message is called in creation.
I read on many forum that associate message is called in an N:N relationship, so I would like to understand if it is a common behavior that it is called also in an 1:N relationship. If so, who I can avoid to call the update message on create?
I found this problem in any new record created through related tab. No problem at all if I create new record in any other way, even if I valorize lookup

  • RE: Why associate message is called when I create a record from related tab in a form even if it is a 1:N relationship?

    Thank you for your reply. I would like avoiding hide "New" button from related grid, because often it is usefull for support entity that has just a short role.

    For example, like in this case, I would be able to create the position record, related with the scaffold, just from its related item, without put on the sitemap the "position" button.

    Also, I am not understanding why the associate message is called if I create a new record from related side and not, for example, if I just create from zero the same record with same lookup valorized. Sdk says that associate message is called when there is a N:N relationship, but in my case it is a Scaffold 1 : N Position

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Why associate message is called when I create a record from related tab in a form even if it is a 1:N relationship?

    Hi Federico Pelliccia,

    According to your description, you can hide new button by Ribbon Workbench to avoid this behavior.

    1.Add your Position entity to your solution and load it by Ribbon Workbench.

    2.Hide add new button and publish your solution.

    pastedimage1631078123981v1.png

    Result:

    The new button would be hidden when you navigate  to related to create it.

    pastedimage1631078273778v2.png

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,269 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,198 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans