How to pass Catalog Item sys_id in Reference qual?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-20-2018 07:54 AM
Hi
I am trying to pass Catalog Item sys_id from Reference qual of a variable to Script Include.
But whenever i does current.sys_id, it is passing random value to the Script Include. Neither passing current alone has worked.
The syntax how i used Reference qual is as follows: javascript: new SIName().functionName(current.sys_id);
What should i do instead?
Thanks in advance.
Regards

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-20-2018 01:33 PM
try current.sc_cat_item.sys_id
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-21-2018 02:04 AM
Hi Mike
Tried this. Was getting undefined value.
Basically, when i did current.sys_id. That itself is populating some random sys_id, most possibly Cart sys_id.
Regards
Harish
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-20-2018 10:10 PM
Hi Harish,
Are you using Service Portal to render the catalog item form? Any ways, You dont have to pass the sysid from the refernce qualifier. You can directly get the sysid of the current item in the script include.
Thanks,
Arun
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-20-2018 10:24 PM
Hi,
You can create a variable lets say "v_cat_id" and populate its values using onLoad catalog client script
g_form.setValue("v_cat_id", g_form.getParameter("sys_id"));
Once done, use this variable for reference qualifer.
new SIName().functionName(current.variables.v_cat_id);