Oncell edit client script is working in List view but not in SOW
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2 hours ago
Hello Everyone
We are facing an issue in which the oncell edit client script is working in native UI but not in SOW.
We have made description field mandatory so that on list view if someone tries to save it as blank they get a message as below. But this is not being on SOW list view. I have also tried making on celledit client script UI type to all.
On some portals it was mentioned to use Data policy but that will not be feasible I think as if in future incidents come from integration or if end user send it from employee where description field isn't there so this may be an issue. so I wanted UI configuration only.
Has anyone faced such issue? Do you have any suggestion as to what we should do in this case.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
an hour ago
onCell edit doesn't work on SOW list
This is OOTB behavior
Why not use before insert/update BR and check if field is empty and then stop the user with record update?
💡 If my response helped, please mark it as correct ✅ and close the thread 🔒— this helps future readers find the solution faster! 🙏
Ankur
✨ Certified Technical Architect || ✨ 10x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
an hour ago
Hi @sharmaprash
Make sure on your client script,
- UI Type is set to "All" and
- unchecking isolate script
and try
Regards
Tanushree Maiti
ServiceNow Technical Architect
LinkedIn: https://www.linkedin.com/in/tanushreemaiti
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
an hour ago
Hi @sharmaprash
onCellEdit Client Scripts do not run in ServiceNow Workspaces (including Service Operations Workspace / SOW
Does "onCellEdit" client scripts works on workspac... - ServiceNow Communit
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
57m ago
Hi @sharmaprash, ,
I was able to achieve this requirement using a Before Update Business Rule on the Incident table instead of an onCellEdit Client Script.
Since onCellEdit Client Scripts are not supported in Service Operations Workspace (SOW), I implemented the validation on the server side:
(function executeRule(current, previous /*null when async*/) {
// Add your code here
if (gs.isInteractive()) {
if (gs.nil(current.description)) {
gs.addErrorMessage('Description is mandatory and cannot be left blank.');
current.setAbortAction(true);
}
}
})(current, previous);
This solution is working successfully in both:
- Native UI List View
- Service Operations Workspace (SOW) List View