web
You’re offline. This is a read only version of the page.
close
Skip to main content
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
    Bipin D365 Profile Picture
    28,981 Moderator on at
    RE: Alternate method for Xrm.Internal.openDialog in UCI form

    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.

  • Yash Trivedi CRM Profile Picture
    351 on at
    RE: Alternate method for Xrm.Internal.openDialog in UCI form

    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,981 Moderator on at
    RE: Alternate method for Xrm.Internal.openDialog in UCI form

    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
    RE: Alternate method for Xrm.Internal.openDialog in UCI form

    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
    a33ik Profile Picture
    84,331 Most Valuable Professional on at
    RE: Alternate method for Xrm.Internal.openDialog in UCI form

    Hello,

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

  • Suggested answer
    ba365guy Profile Picture
    2,950 on at
    RE: Alternate method for Xrm.Internal.openDialog in UCI form

    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

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Andrés Arias – Community Spotlight

We are honored to recognize Andrés Arias as our Community Spotlight honoree for…

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

#1
Abhilash Warrier Profile Picture

Abhilash Warrier 101 Super User 2025 Season 2

#2
Suresh Kulla Profile Picture

Suresh Kulla 70 Super User 2025 Season 2

#3
Daniyal Khaleel Profile Picture

Daniyal Khaleel 60

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans