Networker

[Networker] Update vs. SystemUpdate for SharePoint List Item

2010-06-25 06:08:41
Subject: [Networker] Update vs. SystemUpdate for SharePoint List Item
From: bijayani <networker-forum AT BACKUPCENTRAL DOT COM>
To: NETWORKER AT LISTSERV.TEMPLE DOT EDU
Date: Fri, 25 Jun 2010 04:59:18 -0400
What is the general approach we follow when we try to add / edit a SPListItem 
using the SharePoint object model? Yes I know it! Almost everybody will have a 
common answer to this (which is something similar to what is provided below).

SPListItem item = SPList.Items.Add();

item["Column1"] = "value for column 1";

item["Column2"] = "value for column 2";

item.Update();

The last line in the code above "item.Update()" does the final task of updating 
all the assigned value for that specific item within the SPList.

But is this the only way to update an item? No, we can also update the same 
item using

item.SystemUpdate();

Thanks,
Bijayani
Learn about SharePoint 2010 Migration

+----------------------------------------------------------------------
|This was sent by mfsbijayani AT gmail DOT com via Backup Central.
|Forward SPAM to abuse AT backupcentral DOT com.
+----------------------------------------------------------------------

To sign off this list, send email to listserv AT listserv.temple DOT edu and 
type "signoff networker" in the body of the email. Please write to 
networker-request AT listserv.temple DOT edu if you have any problems with this 
list. You can access the archives at 
http://listserv.temple.edu/archives/networker.html or
via RSS at http://listserv.temple.edu/cgi-bin/wa?RSS&L=NETWORKER

<Prev in Thread] Current Thread [Next in Thread>
  • [Networker] Update vs. SystemUpdate for SharePoint List Item, bijayani <=