3

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.

2
  • 2
    Try criteria based sharing rules which will not be impacted by record ownership. Commented Dec 17, 2012 at 23:01
  • Criteria-based rules only work if the sharing can be criteria-based; if OP needs manual sharing, that won't be applicable.
    – jkraybill
    Commented Dec 18, 2012 at 0:47

1 Answer 1

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

1
  • CAn you please help me with the trigger? I am new to apex. Thanks!!
    – Max
    Commented Dec 20, 2012 at 18:56

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .