global UI button behavior
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-01-2025 07:30 PM
Hello experts,
Here the scenario is, to redirect the change_request form to the list of all open change_requests page on click of 'Update button' (this is a global UI action, by default behavior is routing to previous page). I tried to achieve it by onSubmit client script but no luck. Your inputs will be appreciated. Thanks in advance.
Regards,
Shafi
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-01-2025 07:50 PM - edited 01-01-2025 07:56 PM
Create a new UI action for change request table and over ride the global UI action and then
try below line of code at end in UI action:
action.setRedirectURL('change_request_list.do?sysparm_query=active%3Dtrue');
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-05-2025 10:34 PM
Hi @rambo
Thank you for your response. I created a new UI action on the change_request table and added a condition to the OOB UI action button ( current.table_name != 'change_request') to hide it only on the change request form. It works perfectly. Thank you!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-06-2025 12:52 AM
Adding additional condition on OOTB UI action would skip it during upgrade.
Could you please mark helpful/correct and close this thread
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-01-2025 07:51 PM
the update button takes user to list of records. Ideally it should do OOB
Did you check the OOB UI action on global table?
If it still doesn't work then do these steps
1) Open this OOB UI Action. replace your instance name
https://instanceName.service-now.com/nav_to.do?uri=sys_ui_action.do?sys_id=42df02e20a0a0b340080e61b551f2909
2) Change the table name to change_request and update script as this (add line 4)
3) Do Insert and Stay on the form
Then verify
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