- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-29-2015 10:31 AM
I have a Catalog Client Script that is used by some Catalog Items and some Order Guides. What I would like to know is if I can find out if the script is being called from within a particular order guide.
I tried using g_form and referencing the name of the form...nope.
Is there a way that I can, through the script, find out if it's being run from within a Client Script?
Thanks,
Eric
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-29-2015 02:32 PM
There are a couple of hidden input fields that will help you out here. Add the following line of code to an onLoad catalog client script on both your Order Guide and an actual Catalog Item:
g_form.addInfoMessage("sysparm_guide = " + $("sysparm_guide").value + "<br/>" + "current_item = " + $("current_item").value + "<br/>" + "on the order guide itself = " + ($("sysparm_guide").value == $("current_item").value));
It will display the sys_ids of the Order Guide (sysparm_guide) and the Catalog Item (current_item). You will be on the Order Guide's start page if both sys_ids are the same.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-29-2015 03:35 PM
Make sure that when you get home, you tell your family that someone called you a hero today. Thanks Jim.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-29-2015 09:15 PM
You are welcome