Printer Friendly Version      Send     
Click to Rate and Give Feedback
MSDN
MSDN Library
Web Development
Server Technologies
SDK Documentation
SPListItem Class
SPListItem Methods
SystemUpdate Method
 SystemUpdate Method ()
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)
Visual Basic (Declaration)
Public Sub SystemUpdate
Visual Basic (Usage)
Dim instance As SPListItem

instance.SystemUpdate
C#
public void SystemUpdate ()

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.

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.

© 2008 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Page view tracker