How to redirect to portal using UI action
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-19-2022 12:47 AM
Hi All,
Greetings,
I have a requirement where I need to create an UI action on workspace on case form. When user open a case, click it then it should redirect the user to a catalog item form and pass that particular case number on catalog form filed "case number"
Catalog form name is - Order form
link to catalog item = https://abc123.service-now.com/csp?id=sc_cat_item&sys_id=89c4bd0f1b0455105f5bfd115b4bcb9a&referrer=popular_items
How can we achieve this, I mean what could the code?
- Labels:
-
Customer Service Management
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-19-2022 01:24 AM
Hi Kumaraj,
The redirection in your workspace UI action is in client side code or server side code?
If client side then below code can help you to redirect users.
var url ='/csp?id=sc_cat_item&sys_id=89c4bd0f1b0455105f5bfd115b4bcb9a&referrer=popular_items';
top.window.open(url);
If it is server side then below code should help you.
var url ='/csp?id=sc_cat_item&sys_id=89c4bd0f1b0455105f5bfd115b4bcb9a&referrer=popular_items';
action.setRedirectURL(url);
Please mark this as correct and helpful if it resolved the query or lead you in right direction.
Thanks,
Mohit Kaushik
Community Rising Star 2022
Mohit Kaushik
ServiceNow MVP (2023-2025)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-17-2022 11:34 AM
Hi, I had success with the following line of code in the workspace section of a client side UI action.
location.replace('<Your URL here>');
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-17-2022 12:02 PM
This is exactly what I needed. Thanks for the pic Cole!