How do you get the sys_id of a catalog item in a catalog client script?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-21-2017 11:45 AM
I have a catalog client script on some of my forms where I need to know the sys_id of the catalog item itself (not the unique instance of the form record).
I have tried g_form.getParameter("sysparm_id") in an onload script and it's bringing back a sys_id that does NOT match the catalog item sys_id.
I have also used g_form.getUniqueValue() to no success. How do I get the catalog item sys_id back in my client script?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-08-2019 11:13 AM
g_form.getSysId(); // in London
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-08-2019 11:35 AM
What happens when you call g_form.getUniqueValue()?
That seems to be the most reliable way to get the sys_id of your catalog item and works in both the UI and in ServicePortal.
Are you accessing the item directly, or as part of an order guide?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-08-2019 11:45 AM
I get the same thing as getSysId();
Kinda new to SN so I don't know what you mean by Order Guide -- In my use case, I just needed the sysid for use in a stand alone service catalog item.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-13-2023 05:50 AM
g_form.getUniqueValue(); still works perfectly fine.
Version: Sandiego
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-22-2024 07:23 AM
Did you manage to solve?