1

I had this idea to use a Document Set for release management. Within the Set, we have a number of documents related to a system - not the source code but almost everything else: specifications, requirements, manuals et cetera.

At some point in time, we release version 1.0 of the system and then I would create a version 1.0 of the Document Set too, by tagging the latest versions of documents inside the Set. And at some later point in time, we release a version 2.0 in the same manner.

It sounded like a good idea but now when I am trying it out I cannot find a way to extract version 1.0 of the DocSet after having created 2.0. Except of course by restoring version 1.0 but then I lose 2.0 and mess up the version numbers too.

Am I missing something here? Or do we really have to copy the documents to somewhere outside the DocSet to freeze a version?

EDIT: I found this question how do I view the older version of the document without restoring?. It talks about Documents, not Document Sets, but still indicates that what I'm after would be possible with a bit of custom programming. But what about OOTB? Any ideas?

1 Answers1

1

You could do that programmatically, like this:

ClientContext clientContext = new ClientContext("http://SPSite");
Web site = clientContext.Web;
clientContext.Load(site);
clientContext.ExecuteQuery();
File file = site.GetFileByServerRelativeUrl(“/Shared Documents/mydocument.doc”);
clientContext.Load(file);
clientContext.ExecuteQuery();
ListItem currentItem = file.ListItemAllFields;
clientContext.Load(currentItem);
clientContext.ExecuteQuery();
FileVersionCollection versions = file.Versions;
clientContext.Load(versions);
clientContext.ExecuteQuery();
Salvatore Di Fazio
  • 2,713
  • 16
  • 17