Help Needed: UI Action Button in List View Not Triggering in ServiceNow Workspace
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-06-2025 11:07 PM - edited ‎03-06-2025 11:09 PM
Hi everyone,
I am trying to create a new action in the list view. I have created a new UI action button and written the following script in the UI action:
function onClick() { action.setRedirectURL('https://www.youtube.com/'); }
I added this code in the workspace client script and, for safety, included the same code in the normal script. To display this button in the workspace, I created an action assignment and set the implementation as a client script. The button is visible in the workspace, but no action is triggered when I click it.
Action assignment attachment:
Ui action attachments:
Note: This code is working in the backend view in form and list level
Could anyone help me understand why this is happening and how to fix it?
Thank you!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-09-2025 08:52 PM
Try this in workspace script:
function onClick(g_form) {
top.window.open("https://www.google.com");
}
Murthy
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-10-2025 01:43 AM
I tried this, but it's not working as expected
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-09-2025 09:36 PM
action which is server side object won't work in workspace client script
use this code
function onClick(g_form) {
open("https://www.google.com");
}
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