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

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

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 61

#3
Gerardo Rentería García Profile Picture

Gerardo Rentería Ga... 52 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans