Get a first look at what's coming. The Developer Passport Australia Release Preview kicks off March 12. Dive in! 

About the behavior of "URLSearchParams"

bonsai
Mega Sage

I'm developing a portal screen that I intend to display in the platform's content frame.

I tried to get the URL using "var urlParams = new URLSearchParams(decodeURIComponent(top.location.search));" in the catalog client script, but nothing was retrieved.

The portal screen works fine if I display it in a separate tab instead of the content frame.

Is there any difference in behavior?

<Example of displaying a portal screen in the platform content frame>

bonsai_0-1771457848483.png


<Normal portal screen>

bonsai_1-1771457914855.png

 

 

6 REPLIES 6

Tanushree Maiti
Giga Sage

Hi @bonsai ,

 

Using catalog client script  how to read parameter from URL , you will get from this links. Hope it will help you.

Solved: Re: How to Read Parameter from URL ? - ServiceNow Community

Solved: How to Read Parameter from URL ? - ServiceNow Community

Solved: Get URL Parameters from Client Script - ServiceNow Community

Please mark this response as Helpful & Accept it as solution if it assisted you with your question.
Regards
Tanushree Maiti
ServiceNow Technical Architect
Linkedin:

I tried everything but it didn't work.