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.
  • 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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the August Top 10 Community Leaders

These are the community rock stars!

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
Syed Aqib Raza Profile Picture

Syed Aqib Raza 143

#2
ParthPatel249 Profile Picture

ParthPatel249 96

#3
11manish Profile Picture

11manish 92 Super User 2026 Season 2

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans