我正在尝试使用CSOM在线更新Microsoft项目中的任务,但是它无法正常工作总是返回一个异常(“未知错误”)。 我在这个例子中使用一个例子: https://github.com/OfficeDev/Project-CSOM-My-Task-Checklist
工作分配;
// Loop through each assignment and update % complete
for (int j = 0; j < chkAssignments.Items.Count; j++)
{
assignment = (Assignment)chkAssignments.Items[j];
if (assignment.Dirty)
{
if (assignment.Done)
{
self.Assignments[j].PercentComplete = 100;
self.Assignments[j].Comments = "teste Osmar";
}
else
{
self.Assignments[j].PercentComplete = 0;
}
}
}
// Update the assignments and submit the status updates.
self.Assignments.Update();
self.Assignments.SubmitAllStatusUpdates("");
projContext.ExecuteQuery();