Retire UI Action is not working in the Workspace
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
yesterday
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
yesterday
Seems you customized the OOTB Button and included confirmation and made the UI action as Client + Server
The OOTB button will work for workspace as well.
for workspace you need to write script in workspace client script
1) get confirmation and then use g_form.setValue() to set value and update, you can't run server side code directly in workspace client script, either use GlideAjax and call it from workspace client script and move entire server side code in script include
How to use UI Actions in Workspaces
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
58m ago
Thank you for marking my response as helpful.
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
58m ago
Solution :
function onClick(g_form) { //alert("1. UI Action clicked. Client Side Code Activated."); var prompt = "Do you want wish to continue?"; var bConditionPassed = g_modal.confirm(prompt); if (! bConditionPassed) { return false; } var actionName = g_form.getActionName(); g_form.submit(actionName); }