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: http://office.microsoft.com/en-ca/sharepoint-server-help/create-and-manage-document-sets-HA101782480.aspx#_Toc355081705 More on using the “Capture Version” at http://blogs.technet.com/b/hub/archive/2012/05/15/keeping-in-control-document-set-versioning-in-sharepoint.aspx and http://blogs.technet.com/b/vedant/archive/2010/04/21/using-the-document-set-feature-in-sharepoint-2010-part-1.aspx
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:
When you go to restore that document set, it warns you that the file is gone:
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: http://www.sharepointanalysthq.com/2011/09/document-set-limitations-and-considerations-in-sharepoint-2010/
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 http://msdn.microsoft.com/en-us/library/ff512775.aspx 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.