- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
53m ago
There are two fields, Requested For and Manager, in two separate application tables. When I select a user in the Requested For field, the Manager field should automatically populate with that user's manager and become read-only. How can I implement this in ServiceNow using a Client Script?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
18m ago - last edited 12m ago
Hi @AdithyanS
You can use an onChange Client Script on the Requested for field along with GlideAjax, passing the selected Requested for user's value to a Script Include. In the Script Include, you can use GlideRecord to retrieve the manager from the relevant table based on the selected user and return the result to the Client Script.
Regards
Tanushree Maiti
ServiceNow Technical Architect
LinkedIn: https://www.linkedin.com/in/tanushreemaiti
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
18m ago - last edited 12m ago
Hi @AdithyanS
You can use an onChange Client Script on the Requested for field along with GlideAjax, passing the selected Requested for user's value to a Script Include. In the Script Include, you can use GlideRecord to retrieve the manager from the relevant table based on the selected user and return the result to the Client Script.
Regards
Tanushree Maiti
ServiceNow Technical Architect
LinkedIn: https://www.linkedin.com/in/tanushreemaiti
