How to relate a Salesforce contact record to multiple accounts
2 min
Nowadays, with many executives, contractors, and even employees working for multiple companies at a time, it is not uncommon to require a salesforce contact to be related to more than one parent account record. Here we will try to shed some light on how to achieve this in Salesforce, plus some additional tricks and considerations.
There are three steps to enable users to relate contacts to multiple accounts:
1. Turn the feature ON
First you have to enable It! Go to Setup, enter 'Account Settings' in the Quick Find box, then select Account Settings. There, find the checkbox named 'Allow users to relate a contact to multiple accounts.' You can also decide if you want to allow users to delete accounts with contacts or not and choose to keep relationships when the primary account is changed.
Salesforce creates a new junction object named Account Contact Relationship behind the scenes. It then stores relationship-specific information and whether it is a direct relationship (main account for the contact) or an indirect one.
2. Enabling Salesforce users to relate contacts to multiple accounts.
The second step would be to give users the option to relate the contact to the account (or from within the account view, link an existing contact record). To achieve this, select Object Manager, and for both the Account and Contact object, add the related list to the page layouts in use (do not forget to delete the existing contact related list from the Account's layout to avoid duplication).
3. Customize your Relationship Layout.
Finally, you can add new fields to the Account Contact Relationship to capture detailed information about the contact (the best time to call or the company’s mailing address, for example).
Who can see what:
Regarding data security, from related contacts on accounts, users will only see contacts that they have read access to. If the require permission to view record names in lookup fields setting is deactivated, all related accounts' names will appear on the contact, but reps will only be able to open those which they have read access to.
A few more things to consider:
- Even though you can create validation rules on the Account Contact Relationship object, the fields will not be visible when creating or editing an account (since the object is created automatically by Salesforce). For this reason, you will want to add:
(NOT (ISNEW() && IsDirect)) && (NOT ISCHANGED(IsDirect))
to the condition, to avoid locking out your users from creating new contact records. See more on this link.
- You can import account to contact relationships with the Data Loader. You won’t be able to do this with the Data Import Wizard).
- Keep in mind that standard Salesforce reports will not include data from the indirect relationships (also known as the “secondary accounts”). To solve this, you can create a custom report type.
Need help with linking two salesforce objects? Ask your questions in the comments section and we’ll be more than happy to assist you or subscribe to our blog for weekly tips and tricks on everything Salesforce.