Skip to content

Instantly share code, notes, and snippets.

@pawelgradecki
Created October 29, 2017 21:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pawelgradecki/ebca7d9357234d14b199af8844ca9170 to your computer and use it in GitHub Desktop.
Save pawelgradecki/ebca7d9357234d14b199af8844ca9170 to your computer and use it in GitHub Desktop.
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