+ Start a Discussion
Developer User 44Developer User 44 

How to create "many-to-many" relationship


Can anyone give me an explanation on how to create "many-to-many" relationship - Between "Contacts" and "Products". So that the final result would be as follows:
1. Many contacts can have many products
2. The same product can be related to many products

SandhyaSandhya (Salesforce Developers) 

Refer below salesforce help article for the same.

Please mark it as solved if my reply was helpful. It will make it available for other as the proper solution.
Best Regards
Developer User 44Developer User 44
I believe this article is out of date. Since the custom  field Master-Detail Relationship does not exist any moreUser-added image
Ajay K DubediAjay K Dubedi

You can use a junction object to connect the two objects you want to relate to each other.
A junction object is a custom object with two master-detail relationships. Using a custom junction object, you can model a “many-to-many” relationship between two objects. For example, you create a custom object called “Bug” that relates to the standard case object such that a bug could be related to multiple cases and a case could also be related to multiple bugs.

Here is some useful links that will help in setting up your requirement:

Hope it helps.
Ajay Dubedi.
Kate BrownKate Brown
I have created the Many-to-Many Relationship 2 objects - but then how do I create a field that basically says in Accounts - check box if account contains - the related list "Key_Accounts"