OnLoad Client Script not working on Employee Center form

Josh Evans
Tera Contributor

Hello,

We have just recently implemented the Employee Center and so far everything is going smoothly except for one form I can't quite figure out how it didn't make the transition. This client script is supposed to populate a field with values from the table this Record Producer is tied to, but it is coming out blank. See screenshots attached for script and Employee Center form. The form is working fine in Service Catalog.

 

Any help you offer would be greatly appreciated!

2 REPLIES 2

Prateek kumar
Mega Sage

You are using gliderecord in your client script, it won't work. You need to use either GlideAjax or g_form.getReference with a callback.

https://servicenowguru.com/scripting/client-scripts-scripting/gform-getreference-callback/


Please mark my response as correct and helpful if it helped solved your question.
-Thanks

Mark Roethof
Tera Patron
Tera Patron

Hi there,

 

This might help you:
- 2020-01-10 - Article - Client Side Scripting: Go for GlideAjax (with getXMLAnswer)!

 

Kind regards,
Mark

 

Kind regards,

 

Mark Roethof

Independent ServiceNow Consultant

10x ServiceNow MVP

---

 

~444 Articles, Blogs, Videos, Podcasts, Share projects - Experiences from the field

LinkedIn