Thursday, 29 March 2018

{Know-how}D365 v9 Javascript - ConfirmDialog with custom labels

Below is a quick code snippet and output that can be used for customized confirm dialog

Code Snippet:
 var dialogLabelAndText = { confirmButtonLabel: "Proceed", cancelButtonLabel: "Clear & Exit", text: "This is a Confirmation Dialog", title: "Dialog" };  
   var dialogOptions = { height: 200, width: 450 };  
   Xrm.Navigation.openConfirmDialog(dialogLabelAndText, dialogOptions).then(  
     function (success) {  
       if (success.confirmed)  
         Xrm.Navigation.openAlertDialog({ confirmButtonLabel: "Yes", text: "Process completed!" });  
       else  
         Xrm.Navigation.openAlertDialog({ confirmButtonLabel: "Yes", text: "Exit and Clear Process!" });  
     });  

Output:

No comments:

Post a Comment

Contact Form

Name

Email *

Message *