Take the 2-minute tour ×
Salesforce Stack Exchange is a question and answer site for Salesforce administrators, implementation experts, developers and anybody in-between. It's 100% free, no registration required.

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.

share|improve this question
2  
Try criteria based sharing rules which will not be impacted by record ownership. –  techtrekker Dec 17 '12 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 Dec 18 '12 at 0:47
add comment

1 Answer

up vote 1 down vote accepted

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

share|improve this answer
    
CAn you please help me with the trigger? I am new to apex. Thanks!! –  Max Dec 20 '12 at 18:56
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.