Wednesday, October 12, 2016

Salesforce: Relate Contact with Multiple Accounts

In Summer 16 release, Salesforce introduces 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 gets better, see this release notes.
  • Compact Layouts are now supported
  • Validation Rules 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 a 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 do not confuse with two almost similar related lists. You should modify Related Contacts related list to add all existing fields from Contacts and add Direct.

  • 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.

The object name for this is "AccountContactRelation", this is different with the old "AccountContactRole", which no longer supported in Lightning.


1 comment:

  1. I have an answer , if we add the Contacts related list and not the related list of contacts(that has the relation between account and contact) , so if we add it can we add relationship button??


Page-level ad