Notifications

66 views

Description


Here are some example scripts that can be used to configure a UI action to open a URL on a web browser tab.

Procedure


Firstly, it is important that you have the "client" checkbox ticked so that the script can be executed on the client side.

 

Then in the onclick field, you should specify the function used to trigger the new URL to open

i.e openWindow()

 

And then in the script field, we can then specify the methods to open the URL:

Example 1:

function openWindow(){
top.window.open('https://www.google.com','_blank') ;
}

 

Example 2:

function openWindow(){
var url = 'https://www.google.com';
g_navigation.openPopup(url);
}

 

Note that the URL has "https://" appended to the URL. Without this protocol, the system will treat your URL as a relative path and append it to your instance URL i.e

https://<your-instance-name>.service-now.com/www.google.com

 

Applicable Versions


All

 

Article Information

Last Updated:2018-12-21 00:10:41
Published:2018-12-20