We've updated the ServiceNow Community Code of Conduct, adding guidelines around AI usage, professionalism, and content violations. Read more

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

abbasshaik4
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

@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.