I have a Dynamics CRM 2016 Online installation. I have created a web resource in this application. This web resource is launched from a button in the account list.
On the desktop this works perfectly, it launches a new window and I can do what I need and then navigate to a new record in crm with
Xrm.Utility.openEntityForm(entity, entityId);
and then close the window with
window.close();
I can also access this webbresource in the (iOS) phone app. But neither of the above two commands work when the resource has loaded.
I can't navigate from the webresource to a record using any of these commands:
Xrm.Utility.openEntityForm(entity, entityId); // throws undefined error
window.open(recordURL); // does nothing
window.location.href = recordURL; // does nothing
And I cannot close the webresource with either of these:
window.close(); // does nothing
window.history.go(-1); // goes to a blank page (even more infuriating).
Are there some specific javascript commands for these things (navigate to record, or go back)? I can't seem to find any references to what commands I should be using in the dynamics 365 app.