How to get the requested for supervisor to populate a variable using a catalog client script
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-09-2023 01:33 PM
Hello,
I created a client script to auto populate the supervisor_email variable. It is populated the requested for email instead of the requested for supervisor email. I'm not sure what I am doing wrong. Here is a copy of my script... Any help would be appreciated...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-09-2023 01:51 PM
Hi Rhonda,
This is the same scenario as your previous inquiry. getReference will only return the field values of fields on the referenced table, not field values on any referenced fields of those fields, so use GlideAjax to get the email of the manager.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-09-2023 02:44 PM
Thank you, I will give it a try.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-09-2023 02:31 PM - edited 11-09-2023 02:32 PM
Hi @Rhonda9
getReference() can be used to fetch the fields on the Referenced table only. Double dot-walking will not work here.
You have to user GlideAjax() API to fetch the Supervisor's email:
Client Script:
Script Include: (Should be client callable)
CODE:
Client Script: