I have Custom_Object__c with:
- Org-Wide Default Settings as: Private
- Object Permissions in the user Profile: Create, Read, Edit, Delete.
I have a small development in Apex that is creating some apex managed sharing rules, to give certain users access to records they don't own.
So far I only needed to give the users either "Read" or "Edit" permissions. So all worked ok.
However, now I need to grant users delete permissions for records they don't own. Without touching profile nor org-wide default settings.
This would mean creating the apex managed sharing rules with accessLevel = 'All'.
I looked into the documentation, it seems to say that it's not possible to do that. (http://www.salesforce.com/us/developer/docs/apexcode/Content/apex_bulk_sharing_understanding.htm)
All: This access level can only be granted with Force.com managed sharing.
Does anybody know a workaround to give the user delete permissions for records they don't own using apex managed sharing?
Best Answer
See this answer I had asked another question on this topic because the answer by Ralph Callaway didn't work for me (but I really wanted it to)
I am copying the answer from the original question I asked because I don't want it to be a link only answer. I'm putting it here so others are not misled to think giving Delete access on the object and an edit apex managed share wil let the user delete the record.
The credit for the answer goes to ca_peterson and is reposted here: