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

29 06 2009

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! 🙂

Advertisements

Actions

Information

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s




%d bloggers like this: