Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

Showing java script error when order guide loads

Ashish Das
Tera Contributor

var req_for = g_form.getValue('ita_eui_requ_for');
setPreference('ita_sw_requ_for', req_for);

2 REPLIES 2

Abbas_5
Tera Sage
Tera Sage

 Hello @Ashish Das,

Can you please share the screenshot what error you are getting? and once verify your script.

 

Regards,
Abbas Shaik

Sandeep Rajput
Tera Patron
Tera Patron

@Ashish Das setPreference is usually available with spUtil (https://developer.servicenow.com/dev.do#!/reference/api/vancouver/client/spUtilAPI#SPU-setPreference...) or GlideModel (https://developer.servicenow.com/dev.do#!/reference/api/vancouver/client/c_GlideModalV3API#r_GMODV3-...

 

Since you are not using none of these objects to call this method on the client side, I doubt if it will work.