WSS & MOSS – workflowProperties.Item.Update causes new versions

WSS & MOSS – workflowProperties.Item.Update causes new versions

I haven’t really worked with workflow in a document library with versioning turned on yet…until now.

What we found is that each time some metadata of the document was changed using workflowProperties.Item.Update, a new version of the of the file was created!

You could argue that  this is OK and for the majority of implementations this would probably be fine however we needed to find a way around it:

If you do not want to re-version the document when a workflow changes the metadata then you can use the workflowProperties.Item.SystemUpdate method, see the details here –

http://msdn.microsoft.com/en-us/library/ms461526.aspx

The SystemUpdate method writes the data directly to the database and also accepts a boolean flag defining whether or not to increment the version number, perfect!

Hope this helps! :-)

One thought on “WSS & MOSS – workflowProperties.Item.Update causes new versions

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">