Hey,
so I created a custom button using ribbon workbench which runs a dialog box. The button works great in a regular interface.
from some reason in unified interface when I click on the button I keep getting the following error:
One of the scripts for this entry caused an error. For more information, download the registry file.
The error that appears in the file:
TypeError: Cannot read property 'create' of undefined
at Develop1_RibbonCommands_runDialogForm
I would appreciate your help
Hi,
I am facing the similar problem . Please let me know if you found any solution for this.
Thanks in Advance
It is highly difficult to reach Develop1 support.
I did send them an email I hope I will hear from them.
Any way thanks :)
Given that the code seems to have been written by Develop1 and the url within the create dialog form does not (to me) look as if it's a valid url I think you will need to speak to them. To test that go to your instance and change the url to https://organisationname.crm?.dynamics.com/cs/dialog/rundialog.aspx and I suspect you will get a 404 error page.
A couple of other ISVs also offer replacement dialog tools (TKDialogs often appear in my linkedIn feed) so that may be an option if Develop1 cannot help.
Thank you for your replay.
Please see the code below:
// NOTE: This code is unsupported since it is not using the SDK // This is the only way of exactly mimicking the behaviour of the out of the box // dialog windows that are reliably sized and positioned (function() { Develop1_RibbonCommands_runDialogGrid = function(ids, objectTypeCode, dialogId) { if ((ids == null) || (!ids.length)) { alert(window.LOCID_ACTION_NOITEMSELECTED); return; } if (ids.length > 1) { alert(window.LOCID_GRID_TOO_MANY_RECORDS_IWF); return; } var rundialog = Mscrm.CrmUri.create('/cs/dialog/rundialog.aspx'); rundialog.get_query()['DialogId'] = dialogId; rundialog.get_query()['ObjectId'] = ids[0]; rundialog.get_query()['EntityName'] = objectTypeCode; openStdWin(rundialog,buildWinName(null),615,480,null); } Develop1_RibbonCommands_runDialogForm = function(objectTypeCode, dialogId) { var primaryEntityId = Xrm.Page.data.entity.getId(); var rundialog = Mscrm.CrmUri.create('/cs/dialog/rundialog.aspx'); rundialog.get_query()['DialogId'] = dialogId; rundialog.get_query()['ObjectId'] = primaryEntityId; rundialog.get_query()['EntityName'] = objectTypeCode; var hostWindow = window; if (typeof(openStdWin) == 'undefined') { hostWindow = window.parent; // Support for Turbo-forms in CRM2015 Update 1 } if (typeof(hostWindow.openStdWin) != 'undefined') { hostWindow.openStdWin(rundialog, hostWindow.buildWinName(null), 615, 480, null); } } })();
I used this guide - https://ribbonworkbench.uservoice.com/knowledgebase/articles/140652-create-a-dialog-short-cut-ribbon-button
Thanks
You will need to show us the javascript (if any) that sits behind the button. Also the unified Interface is far more strict when it comes to the form context so look at the deprecated javascript client API document in the latest release notes docs.microsoft.com/.../important-changes-coming and use the new Replacement Client API locations instead.