web
You’re offline. This is a read only version of the page.
close
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

xrm.navigation.openform is not working in unified interface

(0) ShareShare
ReportReport
Posted on by 90

Hello All,

I have 2 forms(Form A and Form B) in Lead entity. Whenever user click the 'New' button to create new record in lead entity, a popup will ask the user to open Form A or Form B. I have created a HTML dialog and call it on click of 'New' button. On the user selection I'm opening either the Form A or Form B.

This functionality is working good in classic UI but not working in UCI.

I am using the below code snippet:

openSelectedLeadForm: function () {
        debugger;
        var iFrameParameters = Alert.getIFrameWindow();
        var formA = iFrameParameters.formA;
        var entityFormOptions = {};
        var formParameters = {};
        entityFormOptions["entityName"] = "lead";

        if (formA) {
            formParameters["formid"] = "JIJ85HUG-J8G3-9865-NKLS-KJOG8J49DM4K";
            Xrm.Navigation.openForm(entityFormOptions, formParameters).then(
            function (success) {
                alert("Success");
            },
            function (error) {
                alert("Error : "   error.message);
            });
        }
        else {
            formParameters["formid"] = "KIOEJID3-8D2H-KJ4H-LK4D-KJIDG49XOK4F";
            Xrm.Navigation.openForm(entityFormOptions, formParameters).then(
            function (success) {
                alert("Success");
            },
            function (error) {
                alert("Error : "   error.message);
            });
        }
    },

Please tell me am i missing any change required it to work in UCI.

I have the same question (0)
  • Suggested answer
    SamiraM Profile Picture
    587 on at

    This is known issue. Check the link below:

    community.dynamics.com/.../uci-xrm-navigation-openform-doesn-t-open-new-record-form-with-correct-process

    Regards

    Samira

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

    Hello,

    I'm pretty sure that Xrm.Navigation.openForm works fine so the reason not in this functionality so I assume that following piece of code doesn't work in UCI:

           var iFrameParameters = Alert.getIFrameWindow();

           var formA = iFrameParameters.formA;

    Try to comment this code out and use just a single piece like:

               formParameters["formid"] = "JIJ85HUG-J8G3-9865-NKLS-KJOG8J49DM4K";

               Xrm.Navigation.openForm(entityFormOptions, formParameters).then(

               function (success) {

                   alert("Success");

               },

               function (error) {

                   alert("Error : " + error.message);

               });

    I'm pretty sure it would work.

  • Suggested answer
    sdfasdf Profile Picture
    842 on at

    I strongly believe that the AlertJS library doesn't play well with the new UCI. As called out in this thread, the Xrm.Navigation.openForm method does work as expected in both legacy Web client and the new UCI.

  • Suggested answer
    asmae5245 Profile Picture
    5 on at

    i had the same problem, i was using the same code as yours and it was working correctly before, i think there was an update lately or something that s why is not working anymore, so i had to put the formId in the entityformoptions as it was described the in the documentation:

    7585.comm.PNG

    this the code i'm using now :         entityFormOptions["formId"] = "4397A629-6A0A-4E65-986E-8386BE85BE21";

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…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
Tom_Gioielli Profile Picture

Tom_Gioielli 170 Super User 2025 Season 2

#2
#ManoVerse Profile Picture

#ManoVerse 70

#3
Jimmy Passeti Profile Picture

Jimmy Passeti 50 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans