Created
October 29, 2017 21:46
-
-
Save pawelgradecki/ebca7d9357234d14b199af8844ca9170 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function showConfirmDialog() { | |
var confirmStrings = { | |
cancelButtonLabel: "Cancel button label, by default it's CANCEL", | |
confirmButtonLabel: "Confirm button label, by default it's OK", | |
text: "Text show on the dialog", | |
title: "Title of the confirmation dialog", | |
subtitle: "Subtitle of the confirmation dialog" | |
}; | |
var confirmOptions = { | |
height: 200, | |
width: 450 | |
}; | |
Xrm.Navigation.openConfirmDialog(confirmStrings, confirmOptions).then( | |
success => { | |
if (success.confirmed) | |
console.log("Dialog closed using OK button."); | |
else | |
console.log("Dialog closed using Cancel button or X."); | |
}, | |
error => { | |
concole.log(error.message); | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment