When attempting to open a modal dialog box, I used the following code:
var addParams = "entityid=" + Xrm.Page.data.entity.getId() + "&entityName=" + Xrm.Page.data.entity.getEntityName();
var webresourceurl = "/webresources/pdfflr_selectorpage.html?Data=" + encodeURIComponent(addParams);
var parameters = {};
parameters["width"] = parent.document.body.clientWidth * 0.95;
parameters["top"] = '0px';
parameters["left"] = '0px';
parameters["height"] = parent.document.body.clientHeight;
//!!!
Xrm.Utility.openDialog(webresourceurl, parameters, null, null, null);
However, I realized that I need to change Xrm.Utility.openDialog
to Xrm.Navigation.openWebResource
. The issue is that Xrm.Navigation
is currently undefined.
So, my question is: How can I achieve opening a dialog box using Xrm.Navigation
?