Ads

Saturday, 23 March 2013

Difference between Update vs SystemUpdate for SharePoint List Item

As a normal we always use item.Update() method while updating any sharepoint list item.
SPListItem item = SPList.Items.Add();
item["Column1"] = "value for column 1";
item["Column2"] = "value for column 2";
item.Update();

We can also use item.SystemUpdate() to update the item.

So lets know the difference between these two ways of updating the list items.

Item.Update()
Item.SystemUpdate()
It will update the "ModifiedBy" and "ModifiedOn" fields as well
Not update these "ModifiedBy" and "ModifiedOn" fields as well
Also updates the version if versioning is on
Not do any versioning




No comments:

Post a Comment

Ads