Hi, for a project with Dynamics 365 Online version 8.2, I wrote a JS script which runs on the Order Entity, performs a web api query and uses a call to XMLHttpRequest using this pretty straightforward piece of code:
var finalFetchXML = String.Format(query,entityGUID)
var encodedFetchXML = encodeURIComponent(finalFetchXML);
var queryPath = "/api/data/v8.0/salesorderdetails?fetchXml=" + encodedFetchXML;
var requestPath = Xrm.Page.context.getClientUrl() + queryPath;
var req = new XMLHttpRequest();
req.open("GET", requestPath, true);
It works fine in a regular browser but when I use the phone app in iOS (latest version) I found a weird behavior.
- If I go the any order record and press the refresh option in the phone app I got the following error:
Event: listLoad
Error: undefined is not a constructor (evaluating new XMLHttpRequest())
- If I never press the refresh option in the phone app, the call is made (asynchronously) and a field is updated in the form (after accepting the save prompts).
I would like to understand the reason behind this behavior with the refresh option and as always, any advise from you is much appreciated.
Xavier
*This post is locked for comments