zoukankan      html  css  js  c++  java
  • difference between SPListItem.SystemUpdate and SPListItem.Update Method

    http://www.codegain.com/articles/sharepoint/developmentprogramming/what-is-the-difference-between-splistitem-systemupdate-and-splistitem-update-method.aspx 

    SPListItem.SystemUpdate:

    Updates the database(Sharepoint list) with changes that are made to the list item, without effecting changes in the Modified Time or Modified By fields.

    SPListItem.SystemUpdate Overloaded Method:

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

    SPListItem.SystemUpdate(Boolean):
    Updates the database with changes that are made to the list item, without effecting changes in the Modified Time or Modified By fields, or optionally, the item version.

    Example:

    {codecitation class=" xml; gutter: true;" width="650px"}

    //Take the reference of that item

    SPListItem listItem = listItemCOll[icount];

    listItem["FIRST_NAME"] = “Amit”;

    listItem["LAST_NAME"] = “Kumar”;

    listItem["EMAIL_ADDR"] = “mcapassion[at]gmail.com”;

    //Update the Item

    listItem.SystemUpdate(false);

    {/codecitation}

    The argument false informs the SP object Model not increment versions.



    SPListItem.Update:

    SPListItem.Update():
    Updates the database(Sharepoint list) with changes that are made to the list item/new version of item, and changes in the Modified Time or Modified By fields.


    Example:


    {codecitation class=" xml; gutter: true;" width="650px"}

    //Take the reference of that item

    SPListItem listItem = listItemCOll[icount];

    listItem["FIRST_NAME"] = “Amit”;

    listItem["LAST_NAME"] = “Kumar”;

    listItem["EMAIL_ADDR"] = “mcapassion[at]gmail.com”;

    //Update the Item

    listItem.Update();

    {/codecitation}

  • 相关阅读:
    Elasticsearch 分词
    Elasticsearch:文档乐观锁控制 if_seq_no与if_primary_term
    调用javaAPI访问hive
    sqoop笔记
    hive学习
    添加用户到sudo组
    HTTP协议用的TCP但是只建立单向连接
    Hadoop基本操作
    Hadoop原理介绍
    sed用法
  • 原文地址:https://www.cnblogs.com/ilawrence/p/2745556.html
Copyright © 2011-2022 走看看