- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-21-2023 05:49 AM
For example if I have a URL that looks like below
From this url is it possible to get value of 'id' in catalog client script
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-21-2023 06:43 AM
Hi @Kalesh A1
Yes you can get it.
onLoad clinet script
//get URL
var gUrl = top.location.href;
alert(gUrl);
var getId = gUrl.split('?')[1].split('&')[0].split('=')[1];
alert(getId);
ServiceNow Developer
I know one thing, and that is that I know nothing.
- Socrates
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-21-2023 08:23 PM
I tried this one, this solution works for other URL parameters, but not for 'id'.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-21-2023 06:43 AM
Hi @Kalesh A1
Yes you can get it.
onLoad clinet script
//get URL
var gUrl = top.location.href;
alert(gUrl);
var getId = gUrl.split('?')[1].split('&')[0].split('=')[1];
alert(getId);
ServiceNow Developer
I know one thing, and that is that I know nothing.
- Socrates
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-21-2023 08:17 PM
Thanks, this worked