Find your content:

Search form

You are here

Need Custom Trigger to Preserve Sharing Settings

 
Share

This is an issue raised by a user. Any ideas on how to tackle this? I am guessing that a custom trigger is required but i have no idea on how to go about it. Any help would be much appreciated. T

Current situation: If I change the owner of a record to myself, add sharing rights to a number of individuals, save, and then change the owner of the record back to the original owner, the sharing settings are not saved.

How it should work: If I change the owner of a record to myself, add sharing rights to a number of individuals, save, and then change the owner of the record back to the original owner, the sharing settings should be saved.

In essence, if the owner of a record is changed, the existing shared settings should not be wiped out. They should be preserved.


Attribution to: Max

Possible Suggestion/Solution #1

I am afraid you need an after trigger, there is a table object__share that has the manual sharing when the owner changes, make sure you keep the manually shared entries on that table by performing an DML operation


Attribution to: Andres Perez
This content is remixed from stackoverflow or stackexchange. Please visit https://salesforce.stackexchange.com/questions/5521

My Block Status

My Block Content