We have a SharePoint 2010-portal for document collaboration, developed for one of our customers.

The require the ability for authors to be able to delete their own draft versions, but not published major versions. So that if you edit a document, and it is in version 2.3, you can delete the .3-version, but you will always leave the 2.0 version behind.

Is this possible?

1 Answer 1


You can achieve this functionality by using an item event receiver on your list items. When the ItemDeleting event fires, you need to check the list item publishing status (Draft,Approved, pending) and delete the item if it's a drat or pending version, else give it an appropriate error.

 public override void ItemDeleting(SPItemEventProperties properties)
           if (properties.ListItem.ModerationInformation.Status == SPModerationStatusType.Approved)
                properties.ErrorMessage = "You can not delete published version";

Of course you also need to check if you are an administrator so you can delete the item even if it's approved version.

  • This has to be done prior to the user pressing the "delete"-button. So that they do not think they are allowed something they're not Jan 16, 2013 at 13:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.