- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-04-2025 05:55 AM
Hi All ,
here I had requirement where i want to hide the close choice on the basis of new change request only
for this I wrote display business rule and on load client script:
--------------------------------------------------------------------------
Display business rule:
--------------------------------------------------------------------------------------
but this does hide the choice closed choice in the list view of the change task.
can anyone help ???
thankss !!
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-04-2025 08:51 AM
I already informed you cannot remove the option from State field
You can just validate and stop user using the approach I shared earlier.
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-04-2025 06:25 AM
on list only onCell edit client script runs and it cannot remove the choice. display business rule runs on form and not on list
you can simply validate and show message to user that you cannot change the choice
You can use before update business rule and stop the update using current.setAbortAction(true)
Cell edit client script like this
function onCellEdit(sysIDs, table, oldValues, newValue, callback) {
var saveAndClose = true;
if(newValue == '6' || newValue == '7' || newValue == '9'){
alert('Not allowed');
saveAndClose = false;
} else {
saveAndClose = true;
}
callback(saveAndClose);
}
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-04-2025 06:32 AM
Okay will check
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-04-2025 07:54 AM - edited 07-04-2025 07:57 AM
can you please help me on
can we not hide the choice "closed" of change task in the list view using BR or oncelledit client script or any other method??
when change request is in new state.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-04-2025 08:51 AM
I already informed you cannot remove the option from State field
You can just validate and stop user using the approach I shared earlier.
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader