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 :
Customer experience | Sales, Customer Insights,...
Suggested Answer

Close model pop up crm form on click button available in xrm.Navigation.alert message

(0) ShareShare
ReportReport
Posted on by 5

Hi,

 var alertStrings = { cancelButtonLabel: "Close", text: "Fill all the Partner details on Escalation Information Tab & then resolve this case", title: "Alert : Required Escalation Information"};                    
                        var alertOptions = { height: 90, width: 210 };  
                                                                             
                        Xrm.Navigation.openConfirmDialog(alertStrings, alertOptions).then(
                            function (success) {
                           
                                console.log("Alert dialog closed");
                                formContext.ui.close();
                            },
                            function (error) {
                                executionContext.getEventArgs().preventDefault();
                                console.log(error.message);
                            }
                        );    
pastedimage1661432019065v1.png
when i click OK or Cancel button. It's going to form which showing behind the message. But, I want to close the form. It's not happening. Please help me to achieve this.
I have the same question (0)
  • Suggested answer
    Abdul Wahab Profile Picture
    12,119 Moderator on at

    Hi Ganeshpandi,

    I think XRM.Navigation is going to help you a lot.

    Let me know if I can provide you with more details

    Thanks
    Regards,

    Abdul Wahab
    Power Platform/Customer Engagement Developer/Lead/Solution Architecture/Project Manager
    Direct/WhatsApp:+923323281237
    E-mail: abdulwahabubit@outlook.com
    Skype: abdul.wahabubit
    Linkedin: www.linkedin.com/.../

  • Ganeshpandi Profile Picture
    5 on at

    Hi,

    I already followed those details. 

     formContext.ui.close();
     
    above code closing the dialog box instead of form.
  • Suggested answer
    Abdul Wahab Profile Picture
    12,119 Moderator on at

    Hi Ganeshpandi,

    Please read my reply carefully... You need to use xrm.naviigation... and the second thing this is a workaround you just need to figure out which screen you need to navigate at this point.

    Let me know if I can provide you with more details

    Thanks
    Regards,

    Abdul Wahab
    Power Platform/Customer Engagement Developer/Lead/Solution Architecture/Project Manager
    Direct/WhatsApp:+923323281237
    E-mail: abdulwahabubit@outlook.com
    Skype: abdul.wahabubit
    Linkedin: www.linkedin.com/.../

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!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the March Top 10 Community Leaders

These are the community rock stars!

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
11manish Profile Picture

11manish 165

#2
ManoVerse Profile Picture

ManoVerse 134 Super User 2026 Season 1

#3
Jimmy Passeti Profile Picture

Jimmy Passeti 59 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans