I use Mscrm.CrmDialog to show a new dialog with a webresource in MS Dynamics CRM 2013. The advantage of this method is that this dialog works in Firefox, Chrome, etc. too and window.showModalDialog doesn't because it is deprecated.
Anyway I need to pass parameters to the webresource. With window.showModalDialog this was no problem but now when using Mscrm.CrmDialog I couldn't find any way to pass parameters. The constructor has a parameter 'customWindowParameters', but how to access these parameter(s) from the web resource?
Declare global variable in the script from where you calling the dialog (Mscrm.CrmDialog) like:
The above globally declared variables can be accessed in the webresource through
window.getDialogArguments()
as in the following sample html webresourceClick Run button results: