How to prevent users from setting State to On Hold in list views only?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-29-2026 07:10 AM
Use case: Incidents moving to an on hold status in our instance has many mandatory fields to be filled out.
We don't want to prevent agents from updating the state for Incident in list view altogether but we want to prevent them from doing this in list/portal list views.
Data policies and business rules don't have access to your current view. Without removing the ability to edit the State altogether in list view, how can this be managed?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-29-2026 08:54 AM - edited 04-29-2026 08:55 AM
Hello @aaronanders
Here is onCellEdit Client script:
function onCellEdit(sysIDs, table, oldValues, newValue, callback) {
var saveAndClose = true;
//Type appropriate comment here, and begin script below
var viewName = g_list.getView();
if (viewName == 'portal') { //System UI > Views
alert('You are not authorized to update State Value "On Hold" in the Portal view.');
saveAndClose = false;
}
callback(saveAndClose); // Returning false prevents the update
}
Validation:
Hope that helps!