Wednesday, July 3, 2019

Disabling the Ability to Associate a Contact to Multiple Accounts in Salesforce

I remember being excited when Salesforce rolled out the ability to associate a single contact with multiple accounts. I thought it would be a great application for the use cases in one of our orgs where a Contact could be both a business contact (associated with a Business Account) and a product user (associated with a custom "Household" account record type). Or for tracking consultant contacts who worked with multiple customer engagements. Lastly, it seemed like a good way to deal with "Contact Dupes" (I had hoped to be able to track all contacts in the system uniquely by email address).

I enabled the feature, heeding Salesforce's warning: "When you allow users to relate a contact to multiple accounts, we recommend you adjust your activity settings so that activities don't automatically roll up to a contact's primary account."

I've since re-evaluated the usefulness feature, at least in one of the orgs I manage. The ability to see all the communications that have with all the different contacts at an account is more critical to our business, then being able to relate a single contact to multiple accounts.

I may tackle creating my own "Account Contact Relationship" junction object in a future date, perhaps with some Visualforce pages that allow a user to see all the communications that a particular contact has in all the different accounts they are affiliated with, but for now, I've opted to simply disable the feature.

That was a bit trickier than I expected it to be: when disabling the feature, I received this error, "Contacts to multiple accounts can't be disabled until all related customizations have been removed. Go to the Account Contact Relationships setup page to make the required changes."

The fix was straight forward: we had created a number of custom fields on the AccountContactRelationship. Even though none of them were in use, or even visible to various profiles, I had to delete them from the standard object.

I also had to re-add the Contact Related list to all page layouts (it was absent from them, because we had substituted the Account Contact Relationship related list, instead).

With those config changes made, we were able to disable the feature -- and reactivate the roll-up of activities to the parent account in Activity Settings.

No comments:

Post a Comment