Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Dynamics 365 general forum

Unified Interface dialog box issue

(0) ShareShare
ReportReport
Posted on by 385

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

  • Unified Interface dialog box issue
    Hello alexyou,
     
    Is your problem solved ?
     
    Because I have the same issue 
  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Unified Interface dialog box issue

    Hi,

    I am facing the similar problem . Please let me know if you found any solution for this.

    Thanks in Advance

  • alexyou Profile Picture
    alexyou 385 on at
    RE: Unified Interface dialog box issue

    It is highly difficult to reach Develop1 support.

    I did send them an email I hope I will hear from them.

    Any way thanks :) 

  • Suggested answer
    Ben Thompson Profile Picture
    Ben Thompson 6,350 on at
    RE: Unified Interface dialog box issue

    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.

  • alexyou Profile Picture
    alexyou 385 on at
    RE: Unified Interface dialog box issue

    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);
            } 
    }
    })();


    ribbun.PNG

    I used this guide - https://ribbonworkbench.uservoice.com/knowledgebase/articles/140652-create-a-dialog-short-cut-ribbon-button

    Thanks 

  • Suggested answer
    Ben Thompson Profile Picture
    Ben Thompson 6,350 on at
    RE: Unified Interface dialog box issue

    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.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

November Spotlight Star - Khushbu Rajvi

Congratulations to a top community star!

Forum Structure Changes Coming on 11/8!

In our never-ending quest to help the Dynamics 365 Community members get answers faster …

Dynamics 365 Community Platform update – Oct 28

Welcome to the next edition of the Community Platform Update. This is a status …

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,516 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,329 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans