我正在寻找一种设置_CheckinComment 的方法。如果我这样尝试:
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();
我得到 Microsoft.SharePoint.Client.ServerException: Invalid data has been used to update the list item。您尝试更新的字段可能是只读的。
我想更改 _CheckinComment (InternalName) 而不是这个:
myUploadFile.CheckIn("This is the comment", CheckinType.OverwriteCheckIn)
谁能帮忙?