The Zurich release has arrived! Interested in new features and functionalities? Click here for more

How to apply client script to "requested_for" field and not request item on Catalog Task form

DevtoSME
Giga Guru

I'm trying to get a client script to apply to the 'requested_for' field but it has the same field name as the requested item field. is this what's preventing the script from working? 

 

I have applied this same script to the incident and change forms so it working for those. it needs to evaluate the user table and verify if a user has a priority selection.

 

any help would be appreciated.

screenshots attached

6 REPLIES 6

Ankur Bawiskar
Tera Patron
Tera Patron

@DevtoSME 

at line 7 try this

g_form.getReference('request_item.requested_for')

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

will this apply to just line 7 or for 12 and 14?

Bert_c1
Kilo Patron

Hi Joyea,

 

See:  GlideFormAPI getreference()

 

For correct syntax.

hi i used ' sc_request_tem.requested_for' and it still not working. do you have any suggestions on the client script?