3

In Earlier release, we have given record access via apex managed sharing. In new release we have removed the apex managed sharing, in place we have used object sharing rules. My question is during deployment the sharing rules to other sandboxes, whether the existing apex managed sharing records are deleted or not as part of sharing rules recalculation??

  • After deployment you can do the recalculation from Sharing Settings. – Santanu Boral Jul 20 '16 at 17:54
  • We have recalculated the sharing settings for that object, still old sharing records (RowCause=Manual) exists in the share object – Nani Jul 20 '16 at 17:56
  • So, you can remove that entries from the object – Santanu Boral Jul 20 '16 at 17:57
2

If the records are created via apex sharing ,then then system does not delete it as a part of recalculation .

If you had custom RowCause defined then its easy to query the table and delete those records else those record may show with rowCause Manual and it might confuse you if user has also manually shared via manual sharing button .

The only way would be to explicitly delete those records via developer console .

  • we deleted the existing one's by SOQL query in PROD. But the thing is when the changes are deployed first time to fully copy sandbox we don't have any issues but next time deployment we faced issues with the sharing records. Earlier version apex sharing records still exist in the sandbox. How come these are created all of a sudden which are not in earlier?? – Nani Jul 20 '16 at 18:30

Your Answer

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

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