ui action button that opens link in new tab when pressed

asd22
Tera Contributor

Hello, i have a button that opens a link up in the current window. I want it to open up in a new tab instead, i have no clue how i go about doing this. Can i get any help?

asd22_0-1674048087528.png

 

4 REPLIES 4

Prathamesh1
Giga Guru

Hi,

Try this UI action opens in new tab

Hope this works! 

Regards.

this did not work.

jaheerhattiwale
Mega Sage
Mega Sage

@asd22 Try below code

 

g_navigation.openPopup(url);

 

Please mark as correct answer if this solves your issue.

Please mark the answer as correct or helpful based on impact
ServiceNow Community Rising Star, Class of 2023

kalyan13
Tera Guru

Hi,

use g_navigation.open() instead of action.setRedirectURL()
g_navigation.open("URL", "_blank"); //give the you link in place of URL it will opens in new tab

 

If it works Please mark my response as Correct / Helpful


Regards,
Kalyan