How to set the _CheckinComment with CSOM?
SharePoint
1
Posts
1
Posters
1
Views
1
Watching
-
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?