only Manager should be able to submit the catalog item
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-07-2025 05:03 AM
Hello Everyone,
Currently I'm working on a scenario where a Manager can only request for Catalog item and no other person can request.
Example: My name is John and my managers name is Mitchell, then in this case only my manager to whom I report should be the only one who can request for this item for me. Suppose there is one more Manager whose name is Lisa and I don't report to her, in that case even if she tries to submit for me, then it shouldn't happen. She should not be able to submit a request for me.
for this I wrote Script Include & Catalog OnSubmit script:
SI:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-07-2025 05:58 AM
One approach is to create user criteria
simply create a user criteria with following code and add this newly created criteria in the available for
(function() {
var userSysId = gs.getUserID();
var gr = new GlideRecord('sys_user');
gr.addQuery('manager',userSysId);
gr.query();
return gr.hasNext();
})();
Mark the solution as helpful and accept if it helps
Thanks
Gaurav Vaze
Servicenow Developer
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
4 weeks ago
Tried the solution! Thank you
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
a month ago
You need to apply reference qualifier on the Requested for variable to show only the reportees of logged in user. This way you will restrict them at selection only so no one except the manager can submit the item.
Go to Dictionary of the Requested for variable
Set Ref Qual as
Manager || is Dynamic || Me
Please mark answer helpful or correct if it helps.
Thanks
Deepak
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
a month ago
Hi @Riri
Can you please explain me, how do you handle the reports to in servicenow. How do we know that you reports to which manager. Is there any field on user table for this?
If my response helped please mark it correct/helpful
Regards
Deepak Sharma