I'm using Xrm.WebApi.offline.updateRecord to update a Dynamics record offline in my PCF component (as documented here: https://docs.microsoft.com/en-us/power-apps/developer/model-driven-apps/clientapi/reference/xrm-webapi/updaterecord).
Other fields update smoothly offline, but if I add a datetime field to the mix & try to save, I get an uninformative error "An error has occurred...". I have tried several formats for the datetime with no success. What kind of date format is expected here?
let data: any = {};
data["myDateField"] = "dd/MM/yyyy hh:mm AM/PM";
Xrm.WebApi.offline.updateRecord("myentity", recordId, data).then(
function success(result) {
console.log("Entry updated.");
},
function (error) {
console.log(error.message);
}
);