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.

5
  • What do the object CRUD permissions look like on the users' profiles?
    – martin
    Nov 10, 2015 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, 2015 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, 2015 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, 2015 at 13:57
  • Looking at ways to achieve this by manipulating the owner of the record and using groups
    – Prajith
    Nov 13, 2015 at 13:58

2 Answers 2

2

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.

1
  • nice alternative solution! Oct 8, 2018 at 11:29
0

Don't give Modify all access in Profile.You can add that user in object permission set to Modify all to delete the records

1
  • 1
    Your answer could be improved with additional supporting information. Please edit to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers in the help center.
    – Community Bot
    Oct 26, 2022 at 16:09

You must log in to answer this question.

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