Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics CRM (Archived)

Create and update Manual N:N entity records

Posted on by Microsoft Employee

Hello,

 

I’m new to Dynamics CRM and have a question to understand the workflow better.

In our organization, an account can have multiple contacts. And some contacts can have multiple accounts (with possible different roles). So I want to make a new entity (manual N:N relation). This is how it should look like:

 

5381.contact.jpg

 

My question: how to get the “Contact Account Manual N:N” entity populated automatically, starting from the “New Contact form”?

Should I add an account field, commercial role field, billing role field, commission role field, delivery role field, technical role field, monitoring role field to the “New Contact form”, and when saving the form, make a new “Contact Account Manual N:N” record through a process (copying the field information from the “Contact form”)? Can I use the same method for an update?

 

Is this the way to  address this issue or should I approach this on a totally different way?

 

Thanks for your advice!

*This post is locked for comments

  • awalters Profile Picture
    awalters 3,079 on at
    RE: Create and update Manual N:N entity records

    I haven't tried anything like that, no.  Sorry.  :-(  Any chance this might be of help?  It looks similar to what was being tried in your second link, but seems to go into a bit more detail?

    dynamics365.ie/dynamics-crm-2013-filter-lookup-dialogs

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Create and update Manual N:N entity records

    Hello Allison,

    All is working well with the Custom N:N Entity / subgrid / quick create.

    But now I'm having trouble getting the right Contacts with an Account selected in the Cases Entity.

    I described the issue here:

    community.dynamics.com/.../253845

    Do you have any idea how to solve this? I also looked into several topics:

    community.dynamics.com/.../219829

    community.dynamics.com/.../212517

    But no solution it seems. Maybe you solved this in your solution?

    Many thanks

  • awalters Profile Picture
    awalters 3,079 on at
    RE: Create and update Manual N:N entity records

    You're welcome!  Feel free to ping me if you have any further questions.

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Create and update Manual N:N entity records

    Hello Allison,

    Thanks for you extensive answer!

    We checked out 'Connections' also, even tested it but their behavior are not what we're looking for.

    I will try your different proposals and work out the solution in my first post, and get back to you how we finally implemented the account-contact relationship.

    Greetings

  • awalters Profile Picture
    awalters 3,079 on at
    RE: Create and update Manual N:N entity records

    One more comment around mapping, since it was mentioned above (and I know this took me a bit to catch on to when I started) - mapping is a way of telling data to flow from one entity to a child entity when dealing with a 1:N relationship.  It can be really useful, but has two potential gotchas:

    1. It's one time only.  It just sets it when the record is created; it does not update the child if the parent field changes.  There are other ways to deal with this, like calculated fields or workflows.

    2. It only works if you're creating the child record from the parent record directly.  If you go to the child entity through the menu, add a new record, and then select the parent record, the data does not flow through the mapping.

  • Verified answer
    awalters Profile Picture
    awalters 3,079 on at
    RE: Create and update Manual N:N entity records

    We are in a similar boat - the OOTB 1:N between accounts and contacts is just not useful to us at all, as it does not reflect the reality of our data or how we need to manage it.  We've reviewed using Connections, as suggested, but we decided that did not work for us as there were too many specific fields around this particular connection that wouldn't apply to other types, and the Connections are still using legacy forms (which are much more limited in how you can adjust the forms, what they look like, etc...).  The Connections may work for you, so definitely review them, but if not...here's some of our experiences.  Before I go into it though, I'll highlight two things that may come up regardless of whether you use Connections or whether you use a manual N:N - basically, if you end up having any type of N:N relationship between accounts and contacts.

    1. The OOTB functionality of the Social Pane, that shows all of the activities, notes, and posts, has special functionality around the base 1:N relationship between accounts and contacts.  All activities from child contacts of a given account will get rolled up to be visible on that parent account.  If you're not using that 1:N relationship, you'll be missing that functionality.  If it's important to you, there are ways around it, but that's a whole different topic.

    2. Are you planning to sync contacts to Outlook as Outlook contacts?  Any kind of N:N connection between accounts and contacts can complicate that.  I also won't dive into that unless you're planning on doing it, though.  :-)

    We are using a manual N:N with a linking entity, as you talk about in your original post.  In terms of getting data to flow/populate, we just have a subgrid on the accounts (and on the contacts) for those connections, and therefore adding the contact and its link is kind of a two-step process - they add the contact, save it (this is required for the sub-grid to be active), and then click the plus on the sub-grid to create a new connection (which is where we add the fields like role, email, etc... that are specific to the connection between this account and this contact).  We've made this a quick-create form, so this second step doesn't take them to a new screen.  It's not ideal, but it's the best we've come up with so far.  This way, those specific fields are on your linking entity directly, not the account or the contact entities, so you don't have to worry about flowing data in, keeping it updated across entities, and so on.  And hopefully, Microsoft will add in-line edit to their editable grids, so that you could add the connection record directly into the subgrid rather than having to click the + for a new record.   One last thing to keep in mind - for the + to work like you'd desire, you'd need to make the contact field required on your linking entity.  That way, when you click the + from the contact, it will automatically go to create a new one and fill in your contact, rather than giving you the option to link to an existing connection record, which adds extra unwanted clicks.

    Anyway, I've worked on this whole area a lot, and can certainly delve deeper into any area of it if it would be helpful.  I just *really* hope there's some improved functionality in future around facilitating N:N relationships between accounts and contacts, since the Connections often don't cut it when dealing with these two entities in particular (for the various reasons above, and others.  I could go on and on.  :-)  ).

  • Suggested answer
    Jeevarajan Kumar Profile Picture
    Jeevarajan Kumar 747 Most Valuable Professional on at
    RE: Create and update Manual N:N entity records

    Hi Maritjn,

    I believe the 'Contact Account Manual' has its own fields - commercial role field, billing role field, commission role field, delivery role field, technical rolefield, monitoring role which doesn't need to be added to the 'Contact ' Entity and capture the details the manual entity itself except the 'Contact' and 'Account' field.

    'Contact'  can be populated while creating new 'Contact Account Manual'  from Contact entity using the Mappings.

    To map Contact field - Open the respected 1:N relationship and open the mappings. Use the appropriate Source and Target.

    Please mark this as right answer if it is helpful.

  • Suggested answer
    Wayne Walton Profile Picture
    Wayne Walton 13,726 on at
    RE: Create and update Manual N:N entity records

    It looks like you're recreating the Connection functionality.  I would recommend looking at  how Connections work in CRM before trying to make your own: msdn.microsoft.com/.../gg328381.aspx

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