1

In an object with OWD as private and sharing rules are enabled to provide Read/Write access of the records to some users. Now I want these users to have delete access too to these records. Since delete access cannot be provided by sharing rules, the only other option seemed to be providing the 'Modify All' permission to the users. Org standards demand that 'Modify All' shall be provided only to Admin users. Please tell me if there is any other way to provide access to these users to delete any record under that object. Thanks in advance.

  • What do the object CRUD permissions look like on the users' profiles? – martin Nov 10 '15 at 6:03
  • 1
    One solution is to use an APEX webservice attached to a custom Delete button - see verticalcoder.com/2011/10/13/deleting_salesforce_contacts. Another is a VF page+controller that overrides the delete standard action. Apex code runs in system context – cropredy Nov 11 '15 at 7:16
  • @martin All the users use the same profile and Create,Read,Edit and Delete Access is given via a permission set to all these users. This enables these users to delete their own records, but not of others(without Modify All) – Prajith Nov 13 '15 at 13:55
  • @crop1645 I am trying to avoid custom development as much as possible. Will do it if there is no other alternative. Thanks for your suggestions. – Prajith Nov 13 '15 at 13:57
  • Looking at ways to achieve this by manipulating the owner of the record and using groups – Prajith Nov 13 '15 at 13:58
1

Finally achieved this by manipulating the ownership of the record. Wrote a trigger to change the ownership of the record from the created user to a queue. This queue has all those users who should have the capability to delete any records. Different queues are the owners of different records based on certain factors. Hence unnecessary delete privileges are not given for any user to a record. This could not have been possible by using 'Modify All' since all the users share the same profile and permission set.

  • nice alternative solution! – Guy Clairbois Oct 8 '18 at 11:29

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.