function saveRecord(scriptContext) {
var currentRecord = scriptContext.currentRecord;
var totalAmount = currentRecord.getValue({ fieldId: 'total' });
if (totalAmount <= 10000) {
var con = confirm("Total amount is less than 10000. Click OK to continue");
if (con) {
return true;
} else {
return false;
}
} else {
return true;
}
}
return {
saveRecord: saveRecord
};