Deleted documents version history behaviour in SharePoint Document Sets

Someone asked me about why it seems Documents that are deleted from Document Sets are apparently not recoverable from the Document Sets version history.

It is a bit odd at first glance- seems like version history should be version history. The official MS description of how to work with versioning in Document Sets is here:   More on using the “Capture Version” at and

When I add two documents, do a Capture Version, delete one of the documents, and then do a second “Capture Version”, the deleted document is definitely gone:

10-7-2013 9-12-59 AM

When you go to restore that document set, it warns you that the file is gone:


10-7-2013 9-14-09 AM

Essentially this is behavior is “by design” as dealing with document deletes is outside it’s functionality intent. Document Set’s don’t have any special ability to overcome the absence of a document – deletions follow the same recycle bin > delete lifecycle in Document Sets as well.

More on other limitations of document sets here:

I would be surprised if this would ever be changed as out of the box SharePoint behaviour– the core problem would be – if I delete a document, and then it gets run through the first and second stage recycling, it would be most definitely gone- deleted from the SP DB.  So imagine if we made a special exception that if documents were in a Document Set, their version histories would be maintained despite what would normally be a hard delete.

This would make life very confusing for the DB/backup admin as you would essentially have orphaned documents that could never be deleted unless the associated Document Sets were deleted.  I’m not sure how that could all be set up in a sensible way.

As the person asking about this scenario found, you would have to come up with custom code to work around this, or move to a more advanced records management/archive solution. One thing that could be done is to write a feature that fires an event receiver on a document delete even, and then execute the code found at under “Download the Document Set as a .ZIP file”. The idea would be to preserve the documents from deletion by downloading the whole document set at that point in time and storing it somewhere else in SharePoint.

Thanks to Stefaan from Belgium for getting me onto the topic.

vSharePoint April 2013 Presentation – SharePoint Document Sets

vSharePoint April 2013 – SharePoint Document Sets – PowerPoint PPTX
vSharePoint April 2013 – SharePoint Document Set – PDF
Here are the assets from my presentation tonight, on SharePoint Document Sets to the Victoria SharePoint User Group, vSharePoint (view on

Thanks to Kelly Marshall & Chris Stone from Sector Learning for hosting.