We recently moved a client to CRM 2013 and upon doing so we are seeing that a modal dialog now causes an error.
The code used to launch the modal dialog is..
var serverUri = Mscrm.CrmUri.create('/cs/dialog/rundialog.aspx');
serverUri = serverUri + '?DialogId=' + dialogID + '&EntityName=' + typeName + '&ObjectId=' + recordId;
openStdDlg(serverUri ,"newWindow",615,480,true, false, "status=1,scrollbars=0,toolbar=0,menubar=0,location=0");
Now I am not sure if the code is now supported or unsupported, however it is causing a bit of head scratching!!
Any help would be appreciated.
From the SDK you should call window.open.
function openDialogProcess(dialogId, entityName, objectId)
var url = Xrm.Page.context.getClientUrl() +
dialogId + "&EntityName=" +
entityName + "&ObjectId=" +
It's not modal (you can go to other tabs or windows) but its working.
I also thought about the unsupported code, but then I tried to run the Dialog with the Run Dialog ribbon, and I'm getting the same error.
If you find the solution please post it. I think that is CRM bug.
Not sure if this helps, but when we moved to CRM 2013, we were getting issues, which we originally thought were Java Script, but on removing it all the error was still there. After countless hours, we found an issue. It seems the UI in CRM 2013 now requires certain fields within a form. For example "all day event" in appointments. I heard similar issues with Leads and Quotes. Might be worth investigating.
Just to confirm that this is on CRM dialogs not forms
I have reviewed this option before and whilst this works it is not modal. The certain requirement needs the user to complete the dialog then redirect when finished.
Potentially point of interest... I have been experiencing the same errors when running modal dialogs following a CRM 2013 upgrade.
I have just updated my Chrome browser to the latest version (Version 31.0.1650.63 m) and the error above is now no longer occurring. It still persists in IE. Just thought it worth a mention. Thanks.
Try this, work perfectly in CRM 2013 in modal window
var primaryEntityId = Xrm.Page.data.entity.getId();
var rundialog = Mscrm.CrmUri.create('/cs/dialog/rundialog.aspx');
rundialog.get_query()['DialogId'] = '00000000-0000-0000-0000-000000000000'; //PUT YOUR GUID HERE
rundialog.get_query()['ObjectId'] = primaryEntityId;
rundialog.get_query()['EntityName'] = 'XXXXX'; //PUT YOUR ENTITY NAME
if you don't want a modal Window, change openStdDlg by openStdWin
This problem happens to some versions of IE Browsers. My IE version is: 9.0.8112.1621, Update Version: 9.0.22 (KB2888505). For some versions of IE (major version is 9), I just cannot open the dialog at all.