Welcome to MSDN Blogs Sign in | Join | Help

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.

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

Attachment(s): Opp MM Accounts.zip

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

Comments

# http://blogs.infinite-x.net/?p=39

Saturday, February 18, 2006 8:13 PM by TrackBack

# http://crmwatcher.com/2006/02/many-to-many-in-microsoft-crm-30.html

Monday, February 20, 2006 4:11 PM by TrackBack

# http://johnspilker.typepad.com/microsoft_dynamics_crm/2006/02/how_to_set_up_m.html

Monday, February 20, 2006 4:11 PM by TrackBack

# http://spaces.msn.com/philiprichardson/

Wednesday, February 22, 2006 7:11 AM by TrackBack

# Many 2 Many - Whats up?

I have been conducting a lot of CRM training recently and I noticed that there is a very confusing image...
Saturday, September 30, 2006 9:20 PM by Invoke Systems Microsoft Dynamics CRM 3.0 Developer's Weblog

# re: Many to Many in Microsoft CRM 3.0 - Opportunity Accounts

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?
Monday, October 02, 2006 3:13 AM by Markus Schmidt

# re: Many to Many in Microsoft CRM 3.0 - Opportunity Accounts

Markus,
Be patient... :-)
Monday, October 02, 2006 7:04 AM by Ben Vollmer

# re: Many to Many in Microsoft CRM 3.0 - Opportunity Accounts

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!

Sunday, February 25, 2007 9:54 AM by manawee

# Follow-up from Convergence 2007 Session

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

Friday, March 16, 2007 12:12 PM by East Region Microsoft CRM

# re: Many to Many in Microsoft CRM 3.0 - Opportunity Accounts

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.

Sunday, March 18, 2007 9:21 PM by Michael Cross

# re: Many to Many in Microsoft CRM 3.0 - Opportunity Accounts

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

Monday, March 19, 2007 5:20 AM by Ben Vollmer

# re: Many to Many in Microsoft CRM 3.0 - Opportunity Accounts

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

Sunday, March 25, 2007 1:02 PM by manawee

# re: Many to Many in Microsoft CRM 3.0 - Opportunity Accounts

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

Tuesday, March 27, 2007 8:29 AM by Falke

# black sex cams

Many to Many in Microsoft CRM 3.0 - Opportunity Accounts

Wednesday, August 08, 2007 6:01 PM by black sex cams

# re: Many to Many in Microsoft CRM 3.0 - Opportunity Accounts

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

Thursday, November 22, 2007 11:43 AM by Aad van der Velden

# re: Many to Many in Microsoft CRM 3.0 - Opportunity Accounts

Aad,

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

Thursday, November 22, 2007 1:08 PM by Ben Vollmer

# re: Many to Many in Microsoft CRM 3.0 - Opportunity Accounts

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

Tuesday, December 11, 2007 2:22 AM by Aad van der Velden

# East Region Microsoft CRM : 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

Thursday, June 05, 2008 9:35 PM by Weddings

Leave a Comment

(required) 
required 
(required) 
 
Page view tracker