web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Service | Customer Service, Contact Center, Fie...
Suggested Answer

Alternate method for Xrm.Internal.openDialog in UCI form

(0) ShareShare
ReportReport
Posted on by 35

Hi Experts,

   On button click on an entity , open a dialog with custom HTML controls (drop down and comments fields) . Save the dialog and capture the fields details on a entity . This is the requirement am working on . To achieve this i have used Xrm.Internal.openDialog method in classic form which works fine but on UCI form it did not worked as this method is unsupported . Do we have alternate method for Xrm.Internal.openDialog on UCI form ?

   I have tried xrm.navigation.openwebresource method on UCI form . But this method does not has callback function parameters. Hence want to know if there is similar method that supports on UCI form as below one . Appreciate your help on this .

Xrm.Internal.openDialog(Xrm.Page.context.getClientUrl() + "/WebResources/ipx_Lead/DisqualifyLead", DialogOption, null, null, callbackFunction);

I have the same question (0)
  • Suggested answer
    ba365guy Profile Picture
    2,950 on at

    Try:

    Please create a canvass app with appropriate fields (drop downs and comments) and use it as dialog

    (docs.microsoft.com/.../replace-dialogs

    No more custom dialog

    Some instructions in this link also might help: https://readyxrm.blog/2019/02/24/replacing-a-dynamics-365-dialog-with-an-embedded-canvas-powerapp/

    This is the way forward

  • Suggested answer
    a33ik Profile Picture
    84,331 Most Valuable Professional on at

    Hello,

    You can check Xrm.Navigation.navigateTo instead of Xrm.Internal.openDialog. Here is my post on that - butenko.pro/.../

  • Yash Trivedi CRM Profile Picture
    351 on at

    Hello Andrew,

    i did same thing which you mentioned above here is my code can you please correct me? where am i doing mistake.

    it give me page not found 404 error  i don't know where am i wrong? because with same url when i am try to open in other tab it is opening without any error.

    code:

    function qualifyLead(primaryControl)
    {
    debugger;
    //Passing parameters to webresource
    var leadId =Xrm.Page.data.entity.getId().replace("{", '').replace("}", '');
    //var addParams = "Param1=" + leadId + "&Param2=" + primaryControl;//custom parameter that you need in the modal dialog


    Xrm.Navigation.navigateTo({pageType:"webresource", webresourceName:"">xxx-dev.crm.dynamics.com/.../xxx_QualifyLead_Model"}, {target: 2, position: 1, width: {value: 50, unit:"%"}});
    }

    thanks & regards

  • Suggested answer
    Bipin D365 Profile Picture
    28,983 Moderator on at

    Hi,

    You should only pass name of the webresource instead of passing with URL. See below example.

    var pageInput = {

       pageType: "webresource",

       webresourceName: "new_sample_webresource.htm"

    };

    var navigationOptions = {

       target: 2,

       width: 500, // value specified in pixel

       height: 400, // value specified in pixel

       position: 1

    };

    Xrm.Navigation.navigateTo(pageInput, navigationOptions).then(

       function success() {

               // Run code on success

       },

       function error() {

               // Handle errors

       }

    );

    Get the we resource name from html web resource page as shown in below image.

    CQ41.PNG

    If found helpful, Please mark my answer verified.

  • Yash Trivedi CRM Profile Picture
    351 on at

    Hy, Bipin

    Thanks,Ya it's working now..i did the same way you mentioned but can you guild me how can i pass parameters along with open webresourece becasue first i have did it using "Xrm.Utility.openWebResource" for different example and it's worked for passing parameter to that web resource...

    i have also try above  reference give by Andrew..but i don't know where am i doing mistake...can you please guide me.

  • Suggested answer
    Bipin D365 Profile Picture
    28,983 Moderator on at

    Hi,

    Use below code to pass the data

    var pageInput = {

           pageType: "webresource",

           webresourceName: "new_sample_webresource.htm",

          data: params

       };

    Parse the data in html page which was passed as Data parameter

    function getUrlParameters() {

    var queryString = location.search.substring(1);

    var params = {};

    var queryStringParts = queryString.split("&");

    for (var i = 0; i < queryStringParts.length; i++) {

    var pieces = queryStringParts[i].split("=");

    params[pieces[0].toLowerCase()] = pieces.length === 1 ? null : decodeURIComponent(pieces[1]);

    }

    return params;

    }

    If found helpful, Please mark my answer verified.

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Congratulations to our 2025 Community Spotlights

Thanks to all of our 2025 Community Spotlight stars!

Leaderboard > Service | Customer Service, Contact Center, Field Service, Guides

#1
NeerajPawar Profile Picture

NeerajPawar 31

#2
Tom_Gioielli Profile Picture

Tom_Gioielli 19 Super User 2026 Season 1

#3
11manish Profile Picture

11manish 18

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans