Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
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.");
console.log("Dialog closed using Cancel button or X.");
error => {
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment