Announcements
function checkForDuplicates(executionContext) {
var formContext = executionContext.getFormContext();
formContext.data.refresh(false).then(function success() {
var duplicateFlag = formContext.getAttribute("eem_ContractDupeFlag3").getValue();
if (duplicateFlag === true || duplicateFlag === 1) {
var alertStrings = {
confirmButtonLabel: "OK",
text: "A record with the same combination of fields already exists.",
title: "Duplicate Warning"
};
var alertOptions = { height: 120, width: 260 };
Xrm.Navigation.openAlertDialog(alertStrings, alertOptions).then(
function success() {
console.log("Alert closed");
},
function error() {
console.error("Error showing alert dialog");
}
);
}
}, function error(err) {
console.error("Error refreshing data: ", err.message);
});
}
André Arnaud de Cal... 291,308 Super User 2024 Season 2
Martin Dráb 230,320 Most Valuable Professional
nmaenpaa 101,156