How to prevent users from setting State to On Hold in list views only?
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
4 hours ago
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?
1 REPLY 1
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2 hours ago - last edited 2 hours ago
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!
