getValue is not working onLoad when value of variable is cascaded from Order Guide in Service Portal

reginabautista
Kilo Sage

Hi, I am currently working on the New Joiner Request Order Guide. I have a variable in the order guide that cascades the value to one of the catalog items. The variable name in question is job_role. This works when value is coming from the item directly (say I select a value from the drop down directly from the record producer or hard code it). Could you please let me know how to overcome this issue? Am I missing a step for this to work in the Order Guide?

 

Note: The value is being passed on the the item successfully but for some reason I could not get it from the code.

 

function onLoad() {
     alert('job role=' + g_form.getValue('job_role'));
}

Thanks
Regina

1 ACCEPTED SOLUTION

reginabautista
Kilo Sage

Hey guys 

 

I had a call with ServiceNow support and he suggested to change this to an onChange script and that did the job 🙂 

View solution in original post

1 REPLY 1

reginabautista
Kilo Sage

Hey guys 

 

I had a call with ServiceNow support and he suggested to change this to an onChange script and that did the job 🙂