Welcome to MSDN Blogs Sign in | Join | Help

East Region Microsoft CRM Blog

This Blog is focused on Microsoft CRM. It specalizes in news for CRM partners and customers, customization tools for demos and local events in the Microsoft East Region.

News

  • Welcome to the Mid-Atlantic CRM Blog, formerly owned and operated by Ben Vollmer, a CRM legend ;). My name is Chris Kahl and Ben has asked me to take over the care and feeding of this most valuable resource. Like Ben, my job is to help partners and customers with Microsoft CRM in the Eastern US. This blog is a great and searchable information source. Feel free to subscribe to the RSS feed to stay current with Dynamics CRM. Any tools discussed here are for DEMO only. You should NOT use these in a production environment unless you test them. Microsoft Support DOES NOT support these tools. Everything here is provided as-is with no warranty.
Many to Many in Microsoft CRM 3.0 - Opportunity Accounts

One of the things that has driven a few newer partners who are used to other CRM Systems bonkers has been how to do a Many to Many relationship type in CRM 3. So after consulting with the experts, it can be done and can be done quite easily. 

In a few vertical industries, this is a requirement. Two of them come to mind quickly. The first is Government Contractors and the second is Real Estate based companies.

What usually the need is to tie many accounts to multiple opportunities with multiple roles. So in one deal, a account may be a buyer, in a second deal, it may be the seller and on a third deal it may be a broker.

So this very simple little XML File create an Entity called Opportunity Accounts that contains links between the Account Entity and the Opportunity Entity.  To replicate:

1.    Create an Entity called Opportunity Accounts

a.    Uncheck the Notes and Activities Options

b.    Check the Make Available Offline

2.    Create a Many to 1 Relationship between the Opportunity and Opportunity Account Entities.

a.    The Type of Behavior should be referential.

3.    Create a second Many to 1 Relationship between Accounts and Opportunity Accounts.

a.    The Type of Behavior should be referential.

4.    I created an Attribute to track Account Type.

a.    Mine was a pick list to enforce some business rules.

5.    Open the form and put the Opportunity, Account and Account Type Fields on the form.

6.    I then edited the associated views to add the account, opportunity and types and remove the owner, created date and name.

7.    Publish your changes and away you go.

Download the XML file here to allow you to import into your demo system.

Posted: Friday, February 17, 2006 7:00 AM by Ben Vollmer
Filed under: ,

Attachment(s): Opp MM Accounts.zip

Comments

TrackBack said:

# February 18, 2006 8:13 PM

TrackBack said:

# February 20, 2006 4:11 PM

TrackBack said:

# February 20, 2006 4:11 PM

TrackBack said:

# February 22, 2006 7:11 AM

Invoke Systems Microsoft Dynamics CRM 3.0 Developer's Weblog said:

I have been conducting a lot of CRM training recently and I noticed that there is a very confusing image...
# September 30, 2006 9:20 PM

Markus Schmidt said:

I am wondering no one has ever solved the m:n issue? What's the problem for REAL m:n connections?
Is it the database or the metadata? No!
It is the User Interface!

Actually you can design REAL m:n connections in MS-CRM using an additional m:n table. But you can NOT display that relation because you cannot hide the m:n table and a user won't understand its meaning.

So it's time to publish an ASP-IFrame component that can handle the invisble intermediate table.
It's just a ASP-Grid component with some lines of code!!!
Can it be the truth, noone has ever solved that?
# October 2, 2006 3:13 AM

Ben Vollmer said:

Markus,
Be patient... :-)
# October 2, 2006 7:04 AM

manawee said:

I have created a custom entity which acts as a special kind of account. However, would I be able to convert an oppurtunity to this custom account.

What do developers do when they have different types of accounts with different names and each with specialised forms.

This cusom account will need to have many to many relationships with contacts and accounts!!!!

Help! I am a beginner!

# February 25, 2007 9:54 AM

East Region Microsoft CRM said:

My apologies in not getting this up sooner. I flew home on the red-eye on Wednesday night, drove from

# March 16, 2007 12:12 PM

Michael Cross said:

Why not use the Relationship Roles?

First, set up the Account/Opportunity relationship roles in the Settings.

Then, go to the Relationships item on the Opportunity form and associate multiple accounts with an opportunity, each with a different role.

This is a simple way of doing a role-based many-to-many relationship.

# March 18, 2007 9:21 PM

Ben Vollmer said:

Agreed. But sometimes you need more than the one field relationship roles give you.... :-)

# March 19, 2007 5:20 AM

manawee said:

Thanks!

This what I had to do in the end! As time was running and I needed to have a demo ready!

This means if I do a number of different accounts with different forms in each I will then need to hide some of the forms (Tabs).

Moreover I would like to give them different names and list them on the navigation tree on the left next to contacts etc.

Perhaps one way of doing that is by saving a search for that particular account under a name and add it to the site map...I will need to experiment with this in the future..

I have also tride to have a multiple choice picklist but found no information.

There are many limitations and the solutions are not easy to find!

Thanks for the help

Manawee

# March 25, 2007 1:02 PM

Falke said:

Hello

I got a problem with my m-to-m relation. This is the case:

I got an employee who has knowledge of a couple programming languages. Now I want to select those languages when I create my employee. Does anyone know how i need to do this?

Thanks

# March 27, 2007 8:29 AM

black sex cams said:

Many to Many in Microsoft CRM 3.0 - Opportunity Accounts

# August 8, 2007 6:01 PM

Aad van der Velden said:

Hi, Can you also create many to many relationships between the Systemuser entity and e.g. the Opportunity entity? I want to be able to add users to an opportunity in a certain capacity. Any thoughts would be welcome! Aad

# November 22, 2007 11:43 AM

Ben Vollmer said:

Aad,

Not in 3.0... But that is one of the new features of 4.0 which i am thankful for. :-)

# November 22, 2007 1:08 PM

Aad van der Velden said:

Hi Ben,

I was afraid of that.. I solved (big word) the problem for now by changing the Owner field for the customer entity into Employee name.. the user adds the custom entity which is automatically set to the current user. In the event a secretary adds the custom entity for her manager she can change the employee name to match her manager's .. it's not pretty, but then again, so is the n:n relationships issue in 3.0..

Aad

# December 11, 2007 2:22 AM

Weddings said:

One of the things that has driven a few newer partners who are used to other CRM Systems bonkers has been how to do a Many to Many relationship type in CRM 3. So after consulting with the experts, it can be done and can be done quite easily. In a few

# June 5, 2008 9:35 PM
Leave a Comment

(required) 

(required) 

(optional)

(required) 

  
Enter Code Here: Required

Comment Notification

If you would like to receive an email when updates are made to this post, please register here

Subscribe to this post's comments using RSS

Page view tracker