Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Customer experience | Sales, Customer Insights,...
Suggested answer

how to create dialog in UCI

(0) ShareShare
ReportReport
Posted on by 35

Hi Experts ,

       I  have custom button (Disqualify Lead) that calls html web resource(as shown below ) on classic mode which is working as expected .

       However it is not working on UCI mode as dialogs got deprecated . Is there a supported way on UCI where i can implement the similar feature that capture the html fields data back to the CRM form on click of "OK" button .  Appreciate your response on this .

pastedimage1586503931775v1.png

  • PhuocLV Profile Picture
    PhuocLV 347 on at
    RE: how to create dialog in UCI

    2020_2D00_04_2D00_24_5F00_22h43_5F00_33.gif

    Did you looking this OOB dialog ?

  • Marco.P Profile Picture
    Marco.P 2,405 on at
    RE: how to create dialog in UCI

    Hi Harish,

    Any news? Did you try the proposed solutions?

  • harish c Profile Picture
    harish c 35 on at
    RE: how to create dialog in UCI

    Hi ,

    Unfortunately firstprimaryitemid did not worked . After exploring , primarycontrol  argument worked fine.

  • Marco.P Profile Picture
    Marco.P 2,405 on at
    RE: how to create dialog in UCI

    Hi,

    this should work:

    //Get the form context

    var formContext = executionContext.getFormContext();

    //Get the current Record Guid

    var recordGuid = formContext.data.entity.getId();

    Anyway if you're calling the webresource from a custom button, using ribbon workbench you can pass the record id directly to your function. Just pass FirstPrimaryItemId or FirstSelectedItemId (for subgrid).

  • harish c Profile Picture
    harish c 35 on at
    RE: how to create dialog in UCI

    Hi Andrew,

      Thanks for the post . Looking forward for the video on how to create dialogs for UCI interface that includes passing parameters to dialog and getting the results back .

    I have one question related to the getting lead id and pass the same to the navigate function as shown below :

    currently am getting lead id in classic approach which is working fine . Do you know the alternate way of getting the lead id as xrm.page is unsupported in UCI mode ? Appreciate your help on this .

    var id = Xrm.Page.data.entity.getId();

    var pageInput = {

       pageType: "webresource",

       webresourceName: "testribbon",

       data: encodeURIComponent(id)

    }

    I have tried below method to retreive lead id . However  i did not see any method that has lead id .

    Any help is highly appreciated .

    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("=");

    Regards,

    Harish Ch

  • Suggested answer
    a33ik Profile Picture
    a33ik 84,325 Most Valuable Professional on at
    RE: how to create dialog in UCI

    Hello,

    I described potential ways on how to Close dialog that is being opened in my post - butenko.pro/.../

    I work on video on how to create dialogs for UCI interface that includes passing parameters to dialog and getting the results of the back back so if you don't want to miss it - subscribe to my twitter/blog/youtube channel.

  • Suggested answer
    Marco.P Profile Picture
    Marco.P 2,405 on at
    RE: how to create dialog in UCI

    I haven't tried it yet, but this is what i would do:

    1) try to pass the id of the record to the web resource

    https://docs.microsoft.com/en-us/powerapps/developer/model-driven-apps/clientapi/reference/xrm-navigation/navigateto

    HTML web resource

    The object contains the following attributes:

    • pageType: String. Specify "webresource".
    • webresourceName: String. The name of the web resource to load.
    • data: (Optional) String. The data to pass to the web resource.

    2) Inside the web resource add a button and perform an update with the webresource filled in fields

    3) On callback (Xrm.Navigation.navigateTo(pageInput,navigationOptions).then(successCallback,errorCallback)) add a refresh page function (so when a user will close de dialog you will be able to see the updated field

    • harish c Profile Picture
      harish c 35 on at
      RE: how to create dialog in UCI

      Hi ,

      I have tried all the mentioned blog before posting the question in community .However i would need to pass html fields data back to lead form and close the page automatically which is not working . appreciate if you are aware of how to implement this ?

      Thanks in advance.

    • Suggested answer
      Marco.P Profile Picture
      Marco.P 2,405 on at
      RE: how to create dialog in UCI

      Hi,

      you can use Xrm.Navigation.navigateTo and as entitytype web resource.

      Please refer to this:

      https://carldesouza.com/using-the-new-modal-dialog-to-open-forms-in-dynamics-365-using-xrm-navigation-navigateto/

      Hope it helps,

      Marco

    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

    Daivat Vartak – Community Spotlight

    We are honored to recognize Daivat Vartak as our March 2025 Community…

    Announcing Our 2025 Season 1 Super Users!

    A new season of Super Users has arrived, and we are so grateful for the daily…

    Kudos to the February Top 10 Community Stars!

    Thanks for all your good work in the Community!

    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,432 Most Valuable Professional

    #3
    nmaenpaa Profile Picture

    nmaenpaa 101,156

    Leaderboard

    Featured topics

    Product updates

    Dynamics 365 release plans