Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. SharePoint
  4. How to set the _CheckinComment with CSOM?

How to set the _CheckinComment with CSOM?

Scheduled Pinned Locked Moved SharePoint
sharepointhelptutorialquestion
1 Posts 1 Posters 1 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • U Offline
    U Offline
    User 9200126
    wrote on last edited by
    #1

    Hi there, i'm looking for a way to set the _CheckinComment. If I try it like this:

    Microsoft.SharePoint.Client.File myUploadFile = myList.RootFolder.Files.Add(fileCreationInformation);
    ListItem myItem = myUploadFile.ListItemAllFields;
    myItem["Title"] = Path.GetFileName(sDocPath);
    myItem["_CheckinComment"] = "This is the comment";
    myClientContext.Load(myItem);
    myClientContext.Load(myUploadFile);
    myClientContext.ExecuteQuery();

    I get Microsoft.SharePoint.Client.ServerException: ... The field that you want to upgrade, may be write protected. I want to change the _CheckinComment (InternalName) and not this:

    myUploadFile.CheckIn("This is the comment", CheckinType.OverwriteCheckIn);

    Who can help?

    1 Reply Last reply
    0
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • World
    • Users
    • Groups