- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-20-2014 07:37 AM
Hi all,
Is there a way to get the name of the record producer (or other values, i.e., Category, Catalog, etc) using a catalog client script? I have a scenario where I am using a variable set in quite a few of my record producers. I have a catalog client script running onchange for a variable in that variable set.
Recently, we had a new requirement that for a subset of forms, this variable should be set onLoad, and not changed like it would be for the majority of forms.
So basically, I need to determine which form I'm on, and if it matches a certain condition, abort my onChange script.
Any help is appreciated.
Thanks!
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-20-2014 08:03 AM
var cat_item_id = gel('sysparm_id').value;
This will retrieve the catalog item sys_id.
so in catalog client script you can check like
var cat_item_id = gel('sysparm_id').value;
if(cat_item_id == 'sys_id_of_black_berry')
{
//perform your script
}

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-20-2014 07:57 AM
There's an input element with the id sysparm_item_guid, so you could run the following in your client script to get the record producer id, then use that to grab the name and other attributes.
var cat_id = $('sysparm_item_guid').value;
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-20-2014 08:03 AM
var cat_item_id = gel('sysparm_id').value;
This will retrieve the catalog item sys_id.
so in catalog client script you can check like
var cat_item_id = gel('sysparm_id').value;
if(cat_item_id == 'sys_id_of_black_berry')
{
//perform your script
}