Hi,
Below is the code which i am using on Form OnSave event.
function confirmClose(execObj) {
Xrm.Utility.confirmDialog("Do you want to set the value?",
function () {
//Set Value
},
function () {
execObj.getEventArgs().preventDefault();
}
);
}
It works fine on click of Save button (even if there are unsaved changes).
But if there are unsaved changes and when i click on Save
and Close button,
- Pop-Up opens "Do you want to set the value?".
- Press "Cancel". - The message pop's up again saying "Do you want to set the value?".
The code is getting executed again when
i click on Cancel button.
Could anyone suggest me what could be the issue. ?
Thanks and Regards. Make sure to "Vote as Helpful" and "Mark As Answer",if you get answer of your question.