Hello everyone,
I created a simple javaScript which throw a Confirm Dialog which fire on change the value of a pick list field.
When I execute it, the confirm dialog appears and if i click cancel it appears 2 more times until finally it performs the action required.
How can i fix it and ensure that it only appears once?
Kind regards,
below you can see my code
function ConfirmationDialog(){
var ValueSelected = Xrm.Page.getAttribute('gri_sustainabilityreportstatus').getValue();
debugger;
if (ValueSelected == 172340000 || ValueSelected == 172340001 || ValueSelected == 172340003){
Xrm.Utility.confirmDialog("This option will send a email.", function(){
// Callback that happens when user clicks OK
return;
}, function(){
// Callback that happens when user clicks Cancel.
Xrm.Page.getAttribute('gri_sustainabilityreportstatus').setValue(null);
return;
});
}
else{
return;
}
}
*This post is locked for comments
I have the same question (0)