0

OnCellEdit Client Script:Prevent state being edited from list view If Incident state changes as Resolved

  • syslDs — sys_id of the edited item(s).
  • table — the table name of the edited item(s).
  • oldValues — the old value of the edited cell(s).
  • newVaIue — the new value of the edited cell(s). Is the same for all edited items.
  • callback—a callback will continue the execution of other related cell edit scripts

function onCellEdit(sysIDs, table, oldValues, newValue, callback){

var saveAndClose = true;

if(newValue == 6) { //Resolved

alert("You cannot change the State value to 'Resolved' from a list view");

saveAndClose = false;

}

callback(saveAndClose);

}

OnCellEdit Client Script: Prevent state being edited from list view
Working Code Asked question July 14, 2023