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.

Opp MM

Comments (18)

  1. I have been conducting a lot of CRM training recently and I noticed that there is a very confusing image…

  2. Markus Schmidt says:

    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?

  3. Ben Vollmer says:


    Be patient… 🙂

  4. manawee says:

    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!

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

  6. 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.

  7. Ben Vollmer says:

    Agreed. But sometimes you need more than the one field relationship roles give you…. 🙂

  8. manawee says:


    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


  9. Falke says:


    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?


  10. Many to Many in Microsoft CRM 3.0 – Opportunity Accounts

  11. Aad van der Velden says:

    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

  12. Ben Vollmer says:


    Not in 3.0… But that is one of the new features of 4.0 which i am thankful for. 🙂

  13. Aad van der Velden says:

    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..


  14. Weddings says:

    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