What's the advantage/reason for using SystemUpdate() over Update() when list data update?
1 Answer
We might have to manipulate/update the data without changing the Modified or Modified By fields to meet the business needs and also retaining the document/Item status without incrementing the version is also important aspect to be considered. In such cases SystemUpdate() method of SPListItem can be leveraged.
This basically updates the content database with the changes that are made to the list item without changing the Modified or Modified By fields.
Overridden Methods
- SystemUpdate() – Updates the database with changes made to the list item without changing the Modified or Modified By fields.
- SystemUpdate(true) – Updates the database with changes made to the list item without changing the Modified or Modified By fields, and the item version is increased.
- SystemUpdate(false) – Updates the database with changes made to the list item without changing the Modified or Modified By fields, and the item version is not increased.
Calling the method SystemUpdate() is same as calling SystemUpdate(Boolean) with false.
http://sharepointhangout.com/simple-fix-splistitem-systemupdate-boolean-true-vs-false-explained/
- 1Now you just need to mark your own answer as an answer :) Job well done!Paul Strupeikis– Paul Strupeikis2015-05-12 11:13:28 +00:00Commented May 12, 2015 at 11:13