Many To Many Relationship Between Accounts and Contacts
Account:
Represents an individual account, which is an organization or person involved with your business (such as customers, competitors, and partners).
Contact:
Represents a contact, which is an individual associated with an Account.
Accounts and Contacts:
You need insight into your business and your data and that starts with the people you’re doing business with. In Salesforce, you store information about your Customers using Accounts and Contacts. Accounts are companies that you’re doing business with, and contacts are the people who work for them. Accounts and contacts are related to many other standard objects, which makes them some of the most important objects in Salesforce. Understanding how to use accounts and contacts is key to getting the most out of Salesforce CRM.
Relationship between Accounts and Contacts:
In Salesforce the Accounts and Contacts are considered as 1:M relationship. In simple term multiple contacts roll-up under an Account. Account and contact behaves as master detail in business logics but on UI it is a lookup relationship.
We can create a contact without filling account i.e. it shows that there is a lookup relationship between Account and Contact. If we have created a contact with Account and we delete that account then contact will be deleted, this shows that it is in Master-Detail relationship. This is a standard behaviour in salesforce.
Many-Many Relationship
Salesforce supports only One to One relationship between a Contact and an Account and one to many relationships between account and Contact. But, you can create one to many relationships between a Contact and Account object by using Junction object.in salesforce
Why we need M2M between Account and Contact?
The salesforce allows one to many relationships for Account object to Contact object and one to one relationship for contact and account object. So only single account can be related to contact. On real time, the contact need to be related with multiple accounts. So repeated contacts to be created for relating to Account.
As per the current system of salesforce a contact can have only one account that is one to one relationship between Contact and Account. Because of this one to one relationship we need to create same contact for multiple Account when it is needed. To avoid the repeated creation of Contact, we need the act configuration.
By default, we have one to many relationships between Account and Contact in salesforce. Once we achieved this one to many relationships between contact and Account. It will automatically turn into many to many relationships between Account and Contact objects.
14 Aug