0

In CSOM how can I remove values from FieldUserValue[] field. Here is my current code:

FieldUserValue[] finalApproverColl = (FieldUserValue[])ApprovalItem["FinalApprovers"];

if (ApprovalItem["FinalApprovers"] != null) {
  // Remove all unchecked users from final approvers
  if (finalApproverColl.Length > 0) {
    finalApproverColl.Remove(user => unCheckedUsers.Contains(user.User.LoginName));
  }

  finalApproverColl.SetValue(briefOwner, 0);
  finalApproverColl.SetValue(updatedCoOwnersColl, 0);
  ApprovalItem["FinalApprovers"] = finalApproverColl;
  ApprovalItem.Update();

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.