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
Use SPListItem.UpdateOverwriteVersion()
Updates the item without creating another version of the item.
-
Great thanks but how do I use this in the workflow? Any examples :-) 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
-
-
@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? Commented Mar 19, 2014 at 15:08