Hi @Jeff_Thorpe
Thanks for your feedback,
the code you give me is almost the same as I used. If I try to paste your code I still get the error:
Column 'ODataType' of type text is missing
I can see the the Person Or Group field has a datafield called: ODataType like this (see red text):
Patch(CRMUserSettings, Defaults(CRMUserSettings),
{ User: {'@odata.type':"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser",
ODataType: "",
Claims:Concatenate("i:0#.f|membership|",User().Email),
DisplayName:User().FullName,
Email:User().Email,
Department:"",
JobTitle:"",
Picture:""
},
Title:"User created by PowerApps | " & Text( Now(),"[$-da]dd/mm/yyyy hh:mm:ss")
}
)
But I do not know what to put into this text-field ? If I let it be blank I'm still left with the other error:
"Invalid arguement type expecting record value but different schema type" ? (Anyone knows what this means?)
Actually the old code used to work against Sharepoint Person Or Group field and nothing has changed in the data.
UPDATE:
There is a dataField on the Person Or Group field in Sharepoint. You can find it with this command:
User().User.OdataType
But I do not know what to put into this field. I have tried this with no luck:
Patch(CRMUserSettings; Defaults(CRMUserSettings);
{
Title:"SinglePerson";
User: { ODatatype: #Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser";
Claims: "i:0#.f|membership|" & User().Email;
Department: User().Email;
DisplayName: "xxx";
Email: User().Email;
JobTitle:".";
Picture:"."
};
Startup: { '@odata.type':"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference"; Id:1; Value:"None" }
}
)