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

Not applicable

@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

12 REPLIES 12

Not applicable

@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!!

BrunoPer
Tera Contributor

This post is very useful. Thanks for it! I'm just leaving a print screen for a quick remark that might help others.

BrunoPer_0-1779877171579.png