We've updated the ServiceNow Community Code of Conduct, adding guidelines around AI usage, professionalism, and content violations. Read more

How to Open an URL in New Window from UI Action?

Not applicable

Hi All,

I'm redirecting to an URL on click of an UI Action How i can open that URL in New Window?

@Ankur Bawiskar Any idea on this?

 

Thanks Everyone,

Bala

1 ACCEPTED SOLUTION

Ankur Bawiskar
Tera Patron

Hi,

if the UI action is server side -> then cannot be done

If the UI action is client side -> use this

g_navigation.open(url, '_blank');

Regards
Ankur

Regards,
Ankur
Certified Technical Architect  ||  10x ServiceNow MVP  ||  ServiceNow Community Leader

View solution in original post

10 REPLIES 10

Hi,

since you said you are using gsftSubmit it means that UI action is Client + Server

In that case you cannot open in new tab from server side. I already told this above.

Regards
Ankur

Regards,
Ankur
Certified Technical Architect  ||  10x ServiceNow MVP  ||  ServiceNow Community Leader

Not applicable

@Ankur Bawiskar Commenting the gsftSubmit and using only url and g_navigation.open(url,'_blank') still not working

Not applicable

@Ankur Bawiskar It is working now.

@Balaraju KB 

Glad to know.

Please mark response helpful as well.

Regards
Ankur

Regards,
Ankur
Certified Technical Architect  ||  10x ServiceNow MVP  ||  ServiceNow Community Leader

SumanthDosapati
Mega Sage

Hi @Balaraju KB 

You can try this

var url = "https://abc.com";
g_navigation.openPopup(url, '_blank');

 

Mark as correct and helpful if it solved your query.

Regards,

Sumanth