Skip to main content

Notifications

Announcements

No record found.

Customer experience | Sales, Customer Insights,...
Suggested answer

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

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
    Abdul Wahab 12,070 Super User 2024 Season 1 on at
    RE: Close model pop up crm form on click button available in xrm.Navigation.alert message

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

  • Ganeshpandi Profile Picture
    Ganeshpandi 5 on at
    RE: Close model pop up crm form on click button available in xrm.Navigation.alert message

    Hi,

    I already followed those details. 

     formContext.ui.close();
     
    above code closing the dialog box instead of form.
  • Suggested answer
    Abdul Wahab Profile Picture
    Abdul Wahab 12,070 Super User 2024 Season 1 on at
    RE: Close model pop up crm form on click button available in xrm.Navigation.alert message

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

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,280 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,235 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans