SPListItem.SystemUpdate() drops version comment

5. February 2009

I recently discovered an unfortunate data loss bug in the Windows SharePoint Services 3.0 API. It turned out that calling the SystemUpdate method on an SPListItem object also deletes the version comment on the last version. This kind of defeats the idea behind the SystemUpdate method, which is designed to let applications change one or more properties on an item without leaving any trace like a new last modified time or creating a new version.

In general the method works as expected - but it does have this one unfortunate side effect. I have with no luck tried finding a work-around for it. For one of my clients it is an annoying problem as we have a SharePoint workflow that relies on the SystemUpdate method to update metadata on the associated list item.

Consequently, I ended up reporting the bug to Microsoft. Great news - they managed to reproduce and fix it very fast. It now looks like the fix will make it into the February CU. I must say MS did a very professional job all the way from the support team in Munich to the product team in Redmond. Kudos to you all!

SharePoint Development , ,