How to acquire the current URL in a Service Portal-specific catalog client script?

Daniel149
Kilo Explorer

I need to parse the current URL in a Service Portal-specific catalog client script. How is it possible to get the current URL? I have tried to use document.URL but it doesn't seem to work. I'm on Madrid release. Any ideas?

3 REPLIES 3

rad2
Mega Sage

How about using scratcpad. You could assign the URL in the display Business rule and later use it in the client script.

I have not tried it though

It wouldn't work in my case unfortunately, there won't be any server-side interaction.

Saurav Maiti
Mega Expert

hello,

You may try 

var currentUrl = window.location.href

alert(currentUrl);

 

or

 

this.location.href