I was trying to Create an entity record using "Xrm.WebApi.createRecord" but I'm getting the Following error
"An error occurred while validating input parameters: Microsoft.Crm.CrmException: Invalid property 'edm_donorid' was found in entity 'Microsoft.Dynamics.CRM.edm_bookreceiptdetail'. ---> Microsoft.OData.ODataException: Does not support untyped value in non-open type."
please not that I'm sure that the field 'edm_donorid' exists in the form.
var data =
{
"edm_donorid": {
"logicalname": "contact",
"id": result["_edm_donorid_value"]
}
};
opener.Xrm.WebApi.createRecord("edm_bookreceiptdetail", data).then(
function success(record) {
console.log("record created with ID: " record.id);
// perform operations on record creation
},
function (error) {
console.log(error.message);
// handle error conditions
}
);