It seems my JS is running twice when I have called it only once that is on save, I have used alert dialog box and this alert dialog box comes twice so i am not able to understand why this problem is coming can anyone help below is the code that i have used.
context.getEventArgs().preventDefault();
var alertStrings = { confirmButtonLabel: "Yes", text: "Please complete the Technical Evaluation First and Mark 'Technical Evaluation Completed' field as Yes.", title: "Booking Alert: ERROR" };
var alertOptions = { height: 120, width: 260 };
Xrm.Navigation.openAlertDialog(alertStrings, alertOptions).then(
function (success) {
console.log("Alert dialog closed");
},
function (error) {
console.log(error.message);
}
);