I finally realised that you could do this quite simply without going anywhere near the versioning end of the SharePoint API.
// overwrite the "published" version with a "draft" versionThis did work in my instance where I knew the "current" version of the item was Published, although I'm not sure if this also works when you have draft versions in edit (i.e. version 1.5)
item.ModerationInformation.Status = SPModerationStatusType.Draft;
item.UpdateOverwriteVersion();
No comments:
Post a Comment
This blog has been moved to www.martinhatch.com
Note: only a member of this blog may post a comment.