How to get the full URL of the instance in servicenow.

shivachauhan
Kilo Contributor

Hi,

I would like to know how to get the full url of the instance when i open the ESS page of my instance.

for ex:- my ess page url is https://abc.service-now.com/xyz/help.do , i want to get this full url in a string so that i could search for the text xyz in the url.

i have tried gs.getProperty('glide.servlet.uri'); but it only gives https://abc.service-now.com.

Any help would be appreciated.

Regards,

Shiva Chauhan

1 REPLY 1

Jaspal Singh
Mega Patron
Mega Patron

Hi Shiva,



Try using



  var currentUrl = window.location.href;


    alert(currentUrl);