Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

Instead of using the top.window method is there any way to use?

SRikanth76
Tera Contributor

Hello,

i have using the top.window method is there any alternative way to use url string its working now but portal not working  please suggest me 

 

find_real_file.png

1 REPLY 1

Oleg
Mega Sage

You can move the code, which initialize urls variable outside of setTimeout (directly after var user = '';) and to use the following:

var urls = (this ? this.top : top).window.location.search;

It should work in both Desktop and Service Portal.