2

Is it possible to overwrite a current version of a document from a workflow? I need to update some fields in a list but when I update the fields versioning kicks in and changes the version number. I want the version number to rename the same. Versioning needs to stay switched on.

1 Answer 1

3

Use SPListItem.UpdateOverwriteVersion()

Updates the item without creating another version of the item.

SPListItem.SystemUpdate method

More Explanation

5
  • Great thanks but how do I use this in the workflow? Any examples :-)
    – Mike Blair
    Commented Mar 6, 2014 at 16:29
  • how did you created your workflow, did you used SP Designer or Visual studio Commented Mar 6, 2014 at 16:30
  • Sharepoint Designer
    – Mike Blair
    Commented Mar 6, 2014 at 16:35
  • @MikeBlair you will need to follow this post as you will need to create a custom workflow activity, get reference to your listitem it's running on and then update it manually, social.msdn.microsoft.com/Forums/sharepoint/en-US/… , search the article for item.SystemUpdate(); and change it with item.UpdateOverwriteVersion(); and it should work. Commented Mar 6, 2014 at 16:52
  • I don't have access to Visual Studio how can I implement a custom workflow activity?
    – Mike Blair
    Commented Mar 19, 2014 at 15:08

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.