How can I tell if I am in an order guide?

ewilks
Giga Expert

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

1 ACCEPTED SOLUTION

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.


View solution in original post

6 REPLIES 6

Make sure that when you get home, you tell your family that someone called you a hero today.   Thanks Jim.


You are welcome