- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-19-2020 12:02 AM
Hi,
I have a button created on incident form when i click on it i want to redirect to Service portal categories place.
https://dev82927.service-now.com/sp?id=sc_category
can anyone please help me on this
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-19-2020 12:22 AM
Glad that it worked.
to open in new tab use this
var url = '/sp?id=sc_category';
g_navigation.open(url, '_blank');
Let me know if I have answered your question.
If so, please mark my response as correct & helpful so that this thread can be closed and others can be benefited by this.
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-19-2020 12:06 AM
Hi Irfan,
In your UI Action code try adding below.
action.setRedirectURL("/sp?id=sc_category");
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-19-2020 12:12 AM
Hi Jaspal,
Thank you but it did not worked on the list when i click on it is poping a message as not records selected
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-19-2020 12:06 AM
Hi,
you can have UI action as client side
Onclick: redirect();
Script:
function redirect(){
var url = '/sp?id=sc_category';
top.location.href = url;
}
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-19-2020 12:11 AM
Thank you it worked, can you please help me how to have it display only on related list and can i open it in new tab now it is opening on same window