How to acquire the current URL in a Service Portal-specific catalog client script?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-27-2019 02:15 AM
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?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-27-2019 02:50 AM
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-27-2019 03:03 AM
It wouldn't work in my case unfortunately, there won't be any server-side interaction.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-27-2019 06:11 AM
hello,
You may try
var currentUrl = window.location.href
alert(currentUrl);
or
this.location.href