Set the current line manager for requestor for
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā04-18-2024 09:03 PM
Hi i have service catalog and in that i need to populate the current line manager for requestor for field currently it is fetching value of logged in users manager , and the current_line_manager variable is reference field and its default value is javascript:gs.getUser().getManagerName so even if we changed the requested for it taking logged in users manager name
tried below script include and client script
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā04-18-2024 09:17 PM
Hi there,
Any reason why you are doing this scripted, and not no-code?
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
ā04-18-2024 09:28 PM - edited ā04-18-2024 09:34 PM
Hey Mark ,
cause auto populate feature is not working for current_line_manager field as this variable is created under current line manager variable set hence for that auto population is not enabled
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā04-18-2024 09:41 PM
So the Current Line Manager variable itself is in a Variable Set? Will that Variable always be populated based on Requested For? Which might be in the Catalog Item itself or a different Variable Set?
If so... still no issue using Auto Populate. It;s just that visually you can't select the Variable. Though for example using SN Utils, you can just paste in the sys_id of the Requested For variable.
Tested = works.
Or is your situation different?
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
ā04-18-2024 09:54 PM
can you explian how i can use the SN utils ?
