How to get variable value in Order Guide script (in Service Portal)

peter_repan
Tera Guru

Hi all,

I'm struggling with Order Guide script and cannot find any useful resource on internet.

I'd like to access variable from initial "Describe needs" screen and add dynamically some items to Order guide using "guide.add(sys_id_of_cat_item)".

However, I cannot get the value of variable. 

Command g_request.getParameter('IO:sys_id') is working only in backend.

When using Order guide in Service Portal, I get com.glide.script.RhinoEcmaError: "g_request" is not defined

Any idea how to access variable value in Order Guide script?

find_real_file.png

7 REPLIES 7

Unfortunately not helpful, I'm looking for server side script.

Hi,

i haven't created any time script for order guide,i got the again some links to useful for server side scripting may useful to you.

https://community.servicenow.com/community?id=community_question&sys_id=ea8de38ddb365f00fff8a345ca96...

https://community.servicenow.com/community?id=community_question&sys_id=104003a1db98dbc01dcaf3231f96...

 

varsha

No, unfortunately not helpful. 

In the end we found a workaround that in the onchange script in one variable in first "Describe needs" page we save the variable value in database table and in "Order guide script" we are reading this value.