Autopopulate logged in user's manager in catalog creation using script
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-12-2023 08:03 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-14-2023 08:24 AM
Hi Mary,
We can achieve this via writing Script Include and calling it into Catalog client script
Script include

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-14-2023 08:32 AM
Hi there,
Have you also considered doing this without script? Just checking since you are explicitly mentioning "script".
Kind regards,
Mark
Kind regards,
Mark Roethof
Independent ServiceNow Consultant
10x ServiceNow MVP
---
~444 Articles, Blogs, Videos, Podcasts, Share projects - Experiences from the field
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-14-2023 10:20 AM - edited ‎07-14-2023 10:22 AM
Hi there,
i tried doing it via putting value in default value of variable.
javascript:gs.getUserID().getRecord().getValue('manager');
but it didnt worked
Please let me know if we can ahieve this in different and easiest way.
Thanks
Saba

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-14-2023 10:25 AM
Hi,
Is Manager field a reference field? If so, try below
javascript:gs.getUser().getManagerID()