How can I prevent users from deleting sharepoint task list item? Should i override the ItemDeleting event or is there any other site level options available to achieve the same?
Asked
Active
Viewed 2.8k times
2 Answers
19
You could also set up a custom permission level out of the box.
- Navigate to your Site Collection (if you're in a subsite, you can go to Site Actions -> Site Settings -> Go to top level site settings)
- Site Actions -> Site Settings -> Advanced permissions
- Click Settings -> Permission Levels
- Click Add a permission level
I would recommend using the existing "Contribute" permission level as a guide and just uncheck the "Delete Items" list permission. Then, you can give your users that permission to the list.

Kit Menke
- 7,046
- 1
- 32
- 54
-
2Agreed with this approach. I've done this and called the permission level something like "Contribute without Delete" – Mark Mascolino Apr 04 '11 at 20:22
10
You can use List Item Event Receiver, ItemDeleting method:
public override void ItemDeleting(SPItemEventProperties properties)
{
properties.ErrorMessage = "User don't have permission";
properties.Cancel = true;
}

vvk
- 833
- 5
- 16