- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-08-2025 09:29 PM
We have an issue with some user provisioning for the user's manager. Until we find a fix we want to avoid issues with items auto approving so want to prevent any user who manager field is either empty of the manager in their is inactive to not be able to raise a request.
Ideally one step to do this would be good but we could say to do a scheduled task each day to remove inactive managers from any user's and then have another step for stopping anyone with an empty manager from raising a request.
Any help would be greatly appreciated.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-12-2025 02:39 AM
there is small correction in my script, I updated it above
sharing here as well
gr.addQuery("sys_id", user_id); // it should be sys_id and not sys+id
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-11-2025 09:36 PM
No nothing in the not Available for from memory. I'm trying at the item and category level.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-11-2025 10:11 PM
So the catalog item will be visible to these users
1) if logged in user has manager and is active
share your script here.
Did you test with the correct user?
Did you use User Criteria Diagnostics feature to see?
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-11-2025 10:44 PM
Here is the script
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-12-2025 02:39 AM
there is small correction in my script, I updated it above
sharing here as well
gr.addQuery("sys_id", user_id); // it should be sys_id and not sys+id
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-14-2025 10:39 PM
I didn't even pick on that but would have cause the issue I was seeing for sure. Working as expected not I just need to add to all the categories I want.