UI Action working in Native UI but not triggering on Configurable Workspace (Problem Table)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
7 hours ago
Hi @community
I have a custom UI Action on the Problem (problem) table that validates child Problem Tasks (problem_task) before allowing a state transition.
Expected Functionality:
When a user clicks the UI Action to move the Problem record to the next state, the script checks whether any associated problem_task records are still active/open:
If active ptask records exist -> Show an error/alert message and prevent the state change.
If all ptask records are closed/inactive-> Advance the Problem state to the next state.
The Issue:
This UI Action works as expected in the Native UI, but when executed from the Workspace view, the validation does not work (or the state transition fails/bypasses the check).
Could someone advise on how to properly structure this UI Action for Workspace compatibility?
Do I need to configure the Workspace Client Script field separately?
What is the best practice for performing a synchronous/asynchronous GlideRecord or g_scratchpad check on child tasks in Workspace?
Any code snippets or guidance on setting up the Client vs. Server execution for Workspace UI Actions would be greatly appreciated!
Regards,
Asish
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 hours ago
to make it work in workspace, ensure both these checkboxes are true and you add script in workspace client script
check many OOTB UI actions
💡 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
3 hours ago
Thank you so much for pointing me in the right direction!
I’ve enabled both the Workspace checkboxes on the UI Action as suggested. However, I’m a bit stuck on how to structure the code within the Workspace Client Script field to perform the validation against child problem_task records before executing the server-side state change.
Would you mind sharing the script reference for how to check active child tasks and abort/trigger the server execution in Workspace?
Really appreciate your help and time!
Thaank you 🙂
