Thursday, June 3, 2010

How to update items without changing Modified/Modified By

When there are some operations or a clean up to be done on sharepoint site by a system account using a tool then there is always a constraint that it should not leave its traces. I mean the changes should reflect leaving the modified and modified by column values as it is.
So in this case the method SPListItem.Update() should be replaced by SPListItem.SystemUpdate() and followed by SPList.Update() always.
This way the lisitem will not get a new version created but to the existing version with the changes that you have currently and hence no change in Modified and Modified By columns.


No comments:

Post a Comment