We have a trigger on accountcontactrelationship object which inserts an accountshare record as our account object is private. Accountshare record is inserted based on the accountcontactrelationship record that is inserted.

We have observed that when the primary account on the contact is updated (The direct relationship on the ACR is changed), that deletes the manualshare record that was inserted previously.

Just need to understand why Salesforce is doing it (the reasoning behind it) and how to prevent that.

Thanks in advance

  • Since account is private, when you update primary account for a particular contact previous sharing rules will get deleted. This is because ownership of contact is updated with new Account so previous sharing records doesn't makes any sense. Correct me if I'm wrong. – Rohit Mourya Nov 27 '17 at 6:17
  • Not sure as this is technically not changing the owner of the record. It makes sense when the owner of the related record is changed and then it deletes the sharing rules. In my scenario neither the account owner or contact owner were changed – Bob Gali Nov 28 '17 at 1:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.