Pages

Wednesday, October 12, 2016

Salesforce: Relate Contact with Multiple Accounts

In Summer 16 release, Salesforce introduce a feature to relate Contact with Multiple Accounts. The good thing is this feature is applicable for both Classic and Lightning UI, and in Salesforce1 as well. In Winter' 17 this feature even get better, see this release notes.
  • Compact Layouts Triggers are now supported
  • Validation Rules Triggers are now supported
  • Triggers are now supported
  • Account-contact relationships can now be viewed


When you enable this feature, all of your existing relation between Contact and Account will not change, and they would become "Direct" relation - Account directly lookup from Contact will be called Direct. There will be new related list called Related Contacts for Account Page layout, and Related Accounts for Contact Page layout.

You can see the Direct information from the new "Related Contacts" related list in Account Page layout, or "Related Accounts" related list in Contact Page layout. Personally, I would remove existing Contacts related list in Account, so users not confuse with two almost similar related list. You should modify Related Contacts related list to add all existing fields from Contacts and add Direct.


Setup
  • Navigate to Setup | Accounts | Account Settings
  • Enable "Allow users to relate a contact to multiple accounts"
Once enabled, you can define following actions:



Related Contacts related list from Apple Soft account page layout:



Related Accounts related list from a Contact page layout name Kim Bon:


You can add Custom field and Field Dependency for Account Contact Relationship from Setup | Customize | AccountsAccount Contact Relationship | Fields


Security Model

Add Relationship
All user (with read access to the Account) able to Add Relationship.
Click "Add Relationship" button from Related Contacts (in Account) or Related Accounts (in Contact), then fill in the account-contact relationship information.

Edit Relationship
Only user able to edit contact will be able to Edit Relationship.
Click View Rel (in Salesforce Classic) or View Relationship (in Lightning Experience) link. Then click "Edit Relationship" button.

Remove Relationship
Only user able to edit contact will be able to Remove Relationship.
Click Remove link and OK button to confirm.


Reference: