I have following code snippet to update a certain record using XRMServiceToolkit but it throws exception as well. I could not find out the reason. any idea what I am missing in it.
function updateOrderStatus(){
var orders = XrmServiceToolkit.Soap.Fetch(query);
var value = Xrm.Page.getAttribute(attr);
var osId = orders[0].attributes['new_testid'];
var update = new XrmServiceToolkit.Soap.BusinessEntity("new_test", osId);
update.attributes["new_assignedto"] = { id: value.getValue()[0].id, logicalName: 'systemuser', type: 'EntityReference' };
update.attributes["new_assignedtodate"] = { value: new Date(), type: "DateTime" };
var result = XrmServiceToolkit.Soap.Update(update);
}
Exception:
The formatter threw an exception while trying to deserialize the message: There was an error while trying to deserialize parameter schemas.microsoft.com/.../Services:request. The InnerException message was 'There was an error deserializing the object of type Microsoft.Xrm.Sdk.OrganizationRequest. The value '[object Object]' cannot be parsed as the type 'Guid'.'. Please see InnerException for more details.
*This post is locked for comments
I have the same question (0)