- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-27-2016 10:30 AM
How do I get the sysid of the item about to be created through a Record Producer in a Catalog Client Script? To clarify, I am not looking in getting the sysid of the catalog item itself, but the record that will be produced once someone submits the request.
Solved! Go to Solution.
- Labels:
-
Scripting and Coding
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-27-2016 11:48 AM
I think I found a way of doing by referencing a DOM element. The following code is giving me the sys_id in a catalog client script :
gel('sysparm_item_guid').value
I was hoping there was some function call I was missing but it doesn't look like that is the case.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-05-2016 07:51 AM
Hi Constantine,
I earlier had similar requirement where i was trying to find the sysID of the record producer instance which is going to create the record.
Thank you so much for detail about sysparm_item_guid. It saved lot of my time.
Thanks
Gaurav
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-22-2018 04:37 PM
you can try to grab info off the URL
var sys_id = gup('sys_id', location.href);
function gup( name, url ) {
if (!url) url = location.href;
name = name.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]");
var regexS = "[\\?&]"+name+"=([^&#]*)";
var regex = new RegExp( regexS );
var results = regex.exec( url );
return results == null ? null : results[1];
}