Prevent deletion of a SharePoint list item

How can I prevent users from deleting a sharepoint task list item? Should I override the ItemDeleting event, or are there other site level options available to achieve the same?

+5
source share
2 answers

You can also configure your own permission level out of the box.

  • Go to your site collection (if you are on a subsidiary site, you can go to Site Actions → Site Settings → Go to the top-level site settings)
  • Site Actions → Site Settings → Additional Permissions
  • Click "Settings" → "Permission Levels"

"Contribute" " ". .

+16

, ItemDeleting:

public override void ItemDeleting(SPItemEventProperties properties)
{
    properties.ErrorMessage = "User don't have permission";
    properties.Cancel = true;
}
+9

All Articles