Does anyone have a solution for checking for changes in sObject__Share settings on particular objects in APEX

1 Answer 1


There is a LastModifiedDate on the Share records. If you create a Datetime field on the SObject in question to record Last Sharing Modification Date, a comparison between the latest Share record and that date will tell you if anything has changed.

The other part of the trick is how to initiate that check, since you can't have a Trigger on Shares. If you need to know immediately when something is changed, the only way I can think of would be to replace the entire "Sharing" standard screen with some Visualforce. However, if checking periodically is good enough, you could have a Scheduled Class that looks for recently-modified Share records once a day or even more often.

You must log in to answer this question.

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