Hi there,
I'm patching a selected person to a collection and I keep getting the error on the patch of "AccountEnabled does not exist", despite that fact that I haven't created a field for that in the collection.
This is my inital clearcollect:
ClearCollect(
varCurrentEventLeads,
{
TaskLead: {
'@odata.type':"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser",
Claims: "",
DisplayName: "",
Email: "",
JobTitle: ""
}
}
);
And this is my patch:
Patch(
varCurrentEventLeads,
ThisItem,
{
TaskLead: {
'@odata.type':"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser",
Claims: "i:0#.f|membership|" & Lower(ThisItem.Mail),
DisplayName: ThisItem.DisplayName,
Email: ThisItem.Mail,
JobTitle: ThisItem.JobTitle
}
}
);
No errors at all on the clearcollect, just on the patch. Anything I'm missing here?
change your person field record to
{
Claims: "",
Department: "",
DisplayName: "",
Email: "",
JobTitle: "",
Picture: Blank()
}
Not necessary that you should provide values to all fields of the record. You can have values to Claims, DisplayName, Email. Rest you can leave it black. SharePoint person field will understand and patch correct user.