- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā04-20-2020 03:05 AM
Hi All,
I have a variable set that is being used in many catalog items. One of the variable values in the set has to change based on the catalog item. For that I need to find out which catalog item is opened?
I tried using g_form.getUniqueValue() which is giving me sys id of the catalog item but it's not working in Order guide.
Any help on this? It should work for individual items as well as order guides. I do not want to have redundant code.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā04-20-2020 03:15 AM
Hi,
please check below links:
https://hi.service-now.com/kb_view.do?sysparm_article=KB0689536
can you try this: ensure isolate script is set to false
var catItemSysId = $("sysparm_id").value;
Mark ā
Correct if this solves your issue and also mark š Helpful if you find my response worthy based on the impact.
Thanks
Ankur
Ankur
⨠Certified Technical Architect || ⨠9x ServiceNow MVP || ⨠ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā04-20-2020 04:40 AM
Getting error : There is a JavaScript error in your browser console when I tried it.
g_form.getParameter("sysparm_id")
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā04-20-2020 05:00 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā04-20-2020 05:08 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā04-20-2020 07:17 AM
Hi Geeky,
Execute below code only:
function onLoad() {
alert("Executed");
var guide= $('sysparm_guide').value;
alert(guide);
}
If it helps then please mark my answer Correct and Helpful.
Vishakha
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā04-21-2020 03:54 AM
Same statement g_form.getUniqueValue() worked for order guide as well with isolate script unchecked.