How to hide an incident state (canceled) from the list view?

Jesus Nava
Tera Guru

Hello experts, please I need your help, how can I hide the choice canceled from the "state" dropdown from the list view?

find_real_file.png

Thank you

1 ACCEPTED SOLUTION

@Jesus Nava same script i have used & tested , able to edit on list view and change any state except cancel, working code on my PDI

function onCellEdit(sysIDs, table, oldValues, newValue, callback) {
    var saveAndClose = true;
    if (newValue == 😎 {
        alert("You cannot change the state to Closed from the list view.");
        saveAndClose = false;
    }
    callback(saveAndClose);
}

View solution in original post

11 REPLIES 11

@Jesus Nava same script i have used & tested , able to edit on list view and change any state except cancel, working code on my PDI

function onCellEdit(sysIDs, table, oldValues, newValue, callback) {
    var saveAndClose = true;
    if (newValue == 😎 {
        alert("You cannot change the state to Closed from the list view.");
        saveAndClose = false;
    }
    callback(saveAndClose);
}

I had an error in the script, fixed it and worked, thank you!!