onCellEdit Client Script error: "View should be one of..." despite sys_ui_list record existing
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 hours ago
Hi Community,
I am facing a strange validation error when saving an onCellEdit Client Script. I'm hoping someone can point out if there's a specific cache or hidden property I'm missing.
The Issue: I am trying to restrict an onCellEdit script to a specific custom view named abcdef on my custom table u_laptop_issues. When I uncheck Global and select the view, I get the error:
"View should be one of [extraview], otherwise select the table or check the Global box"
The Evidence: I have verified that the metadata is correct using a background script. The system does have a valid list layout for this table/view combination:
// Background Script Result: *** Script: *** SUCCESS: Found a list layout for table "u_laptop_issues" in view "abcdef". *** Script: *** List Record Sys ID: e41b658683ae3210f21ec070ceaad33c
What I've Tried:
Confirmed all records (Table, View, Script) are in the same Application Scope.
Confirmed the internal name of the view is exactly abcdef.
Successfully used the abcdef view in the actual UI list of the table.
Ran cache.do to clear platform cache.
Toggled the Table field on the Client Script to try and force a refresh.
Why would the Client Script validator fail to recognize a view that clearly exists in sys_ui_list? Is there another table the validator checks besides sys_ui_list?
Current Environment Version: Zurich (latest release)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2 hours ago
When I do something similar and type whatever value for the view, it gives me the internal names of views that I have created. What happens when you put 'extraview' here - or is this a known different view? In any case, it only thinks you have created one.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
an hour ago
onCell edit works on list.
why are you giving view?
💡 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 || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
