SharePoint Update document library document title (title) field

Source: Internet
Author: User

Preface: Write down the code in the small problems encountered, help colleagues write a batch update document library Title field of the small program, originally thought on the update can be, 10 minutes can be done. Results 10 minutes later, the code has been written, the implementation of the error, debugging is no problem, just to update the things did not update. Then ask, the document library opened check in check out (do not judge the error) and version control, find the problem, update is not.

1, nonsense not much to say, above the figure and code.

SPFile file = Listitemcoll[j]. File;
File. CheckOut ();
File. Update ();
File. item["title"] = UpdateTo;
File. Update ();
File. Item.update ();
File. CheckIn ("Code Update ~ ~");

2, after the completion of the update, the following figure, the title is still home: tried update and systemupdate are not, online check the next there are not implemented, there is no solution;

3, after a trial, and finally a chance to find the problem, incredibly still have the following method, suddenly dawned, version did not update;

file.Item.UpdateOverwriteVersion();

4, so, take a look at version control, to determine their own judgments, the following figure:

Summary: Really is the issue of versioning, although the update succeeded, but not the major version, resulting in no display; a very small problem, encountered in writing here and share with you, hope to help people who encounter the same problems.

See more highlights of this column: http://www.bianceng.cnhttp://www.bianceng.cn/web/sharepoint/

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.