
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-26-2018 05:28 AM
I know you can't use "current" in a client script, but is there any way to get that sys_id in the script?
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-26-2018 05:40 AM
Hi,
You can try using
var a = g_form.getUniquevalue();
alert('Sys id is '+a);
Thanks,
Jaspal Singh
Hit Helpful or Correct on the impact of response.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-26-2018 05:40 AM
Hi David,
Please use the below script:
function onLoad() {
//Type appropriate comment here, and begin script below
var id = getParmVal('sysparm_id');
alert(id);
}
function getParmVal(name){
var url = document.URL.parseQuery();
if(url[name]){
return decodeURI(url[name]);
}
else{
return;
}
}
Regards,
Ram M

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-26-2018 06:14 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-26-2018 05:40 AM
Hi,
You can try using
var a = g_form.getUniquevalue();
alert('Sys id is '+a);
Thanks,
Jaspal Singh
Hit Helpful or Correct on the impact of response.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-26-2018 05:57 AM
Hi,
following quick one would also help.
console.info('catalog item'+g_form.getParameter('sysparm_id'));
thanks
Harshad