SPListItem.SystemUpdate Method () (Microsoft.SharePoint)
Updates the database with changes made to the list item, without effecting changes in the Modified or Modified By fields.

Namespace: Microsoft.SharePoint
Assembly: Microsoft.SharePoint (in microsoft.sharepoint.dll)
Syntax

Visual Basic (Declaration)
Public Sub SystemUpdate
Visual Basic (Usage)
Dim instance As SPListItem

instance.SystemUpdate
C#
public void SystemUpdate ()
Remarks

When you implement the SystemUpdate method, events are triggered and the modifications are reported in the Change and Audit logs, but alerts are not sent and properties are not demoted into documents.

Example

The following code example uses the SystemUpdate method to make changes to a list item.

Visual Basic
Dim siteCollection As New SPSite("http://MyServer ")
Dim webSite As SPWeb = siteCollection.OpenWeb()
Dim list As SPList = webSite.Lists("Announcements")
Dim item As SPListItem = list.Items(0)
item("Title") = "My New Title"
item.SystemUpdate()
C#
using (SPSite oSiteCollection = new SPSite("http://MyServer"))
{
    using(SPWeb oWebsite = oSiteCollection.OpenWeb())
    {
        SPList oList = oWebsite.Lists["Announcements"];
        SPListItem oItem = oList.Items[0];
        oItem["Title"] = "My New Title";
        oItem.SystemUpdate();
    }
}
NoteNote:

Certain objects implement the IDisposable interface, and you must avoid retaining these objects in memory after they are no longer needed. For information about good coding practices, see Best Practices: Using Disposable Windows SharePoint Services Objects.

See Also

Tags :


Community Content

Reza Alirezaei - MVP
Usage

Although, SDK clearly states that this method is a kind of silent/anonymous update without leaving any foot trail behind, it does not refer to its usage. I can see many places that using this method is proffered over ordinary "Update()" method. One of them is when you run a process to adjust some fields in the items of a list and you don't want the “modified by” and “modified date” to be changed to your process account and/or date and time in which adjustment took place or even you don’t want to release another version if versioning is in place.I think this is one of the obvious usages of this method.

Reza Alirezaei, MVP
Blog: http://blogs.devhorizon.com/reza


Page view tracker