Hi All,
We are using MS Dynamics 365 On-Premise version 8.2.
Our client also has old application running on MS Dynamics 2011. Now they are facing issue with "Window.ShowModalDialog()" in the Dyanmcis 2011 application. Here is the query:
We’re having a problem in some of our CRM where in the old code we had written uses Window.ShowModalDialog but that is no longer supported by the latest updates to Chrome and Edge.
var popup = window.showModalDialog(Xrm.Page.context.getClientUrl() + "/WebResources/cmm_sendemail.htm", this, 'center:yes;unadorned:yes;resizable:1;dialogHeight:60px;dialogwidth:550px;scroll:no;status=no');
So we have to use window.open
var popup = window.open(Xrm.Page.context.getClientUrl() + "/WebResources/cmm_sendemail.htm", "Send Email", "center=yes,height=60,width=550,scrollbars=no,resizable=no");
How do we pass the form context (“this”) to the HTML page so we can extract EntityID, EntityName, etc.? Do we have to send each one individually or can we send the whole form context and extract it by element name on the HTML page?
Because this will no longer work since there is no dialogArguments being passed.
var entityId = window.dialogArguments.Xrm.Page.data.entity.getId();
var entityName = window.dialogArguments.Xrm.Page.data.entity.getEntityName();