Contact Roles in Salesforce.
I observed in many salesforce communities that lot of salesforce people facing challenges in associating one contact with multiple accounts, cases, Contracts or Opportunities.
In salesforce architecture Contact has a Standard Account field, which means a Contact can be associate with on account.
However we can create few more Custom lookup fields on Contact to associate few more accounts, but that will not be a good approach to achieve this requirement if you want to associate one contact to n number of accounts, cases or Opportunities.
In order to achieve this requirement, salesforce has provided a standard functionality i.e Salesforce Contact Roles.
A Contact Role Salesforce is the position/post of contact for any account, Case or opportunity. Contact roles salesforce can have multiple roles for n numbers of accounts, case or opportunity. Salesforce Contact roles is the way to establish many to many relationship with Contacts and accounts, Contacts and cases or contacts and opportunities.
For example Sameer Tyagi is the contact in Salesforce for Account XYZ Company and he is also decision maker for PQR Company and Evaluator for ABC Company.
Internally Salesforce has provided a Standard separate objects Account Contact roles, Opportunity contact Roles and Case object roles.
Setting up contact Roles in Salesforce is very easy, there is no code required to set up.
1- If you want to setup salesforce contact roles, you need to follow these steps.
Got to Setup>Customize>Accounts>Contact Roles as shown in image below
2- Define all roles which you want to use in Salesforce as shown in image below, these are the picklist values which you will get when you create any contact role under account.
3- Show contact roles salesforce related list on Account page Layout as shown image below
Associating a contact Role with Account.
1- Open any account and go to Contact roles salesforce related list under the account and add new contact role and select contact
and set role for the contact for that account as shown in series of images below.
2- Click on new button.
3- Add Contact and set role
In terms of technical aspect Account Contact role salesforce is the standard object in salesforce, which has a lookup field on Account and a Lookup field on Contact with a picklist which contains some values, which you define in Account contact role settings page so that it can be used to establish many to many relationship in Accounts and Contacts.