Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics CRM forum
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 Moderator 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 Moderator 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

Anton Venter – Community Spotlight

Kudos to our October Community Star of the month!

Announcing Our 2024 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Dynamics 365 Community Newsletter - September 2024

Check out the latest community news

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 290,537 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 228,520 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,148

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans