Friday, April 20, 2012

Update vs. SystemUpdate for SharePoint List Item

When tried to Move List items from old Site to New Site. I am not only want to create items but also want to keep information of Created Date, Modified Date, Created User, or Modified User.

 I found item.Update() is not useful. It is not only changes that are made to the list item. It also updates the ModifiedBy, ModifiedOn, or version fields as per the current logged in user and current server time.

I used item.SystemUpdate() instead of item.Update(). This will help you in updating only those fields which are specified within your code blocks. It is allow me modify properties modified date and created user.

No comments: