- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-12-2024 07:45 AM
I want to check whether current user is manager or not if he is manager then I want to auto pop all user under that manager in reporteer field and that field will be visible if that user is manager if no that field is not visible on catalog iteam
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-12-2024 11:32 AM
Hi @PriyankaS895282 ,
Use the below code and this will code to determine the user is manager or not.
var is_manager;
var gr = new GlideAggregate("sys_user");
gr.addQuery("manager",userID);
gr.query();
if(gr.getRowCount>0)
{
is_manager = "true";
}
else{
is_manager = "false";
}
Thankyou.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-12-2024 11:32 AM
Hi @PriyankaS895282 ,
Use the below code and this will code to determine the user is manager or not.
var is_manager;
var gr = new GlideAggregate("sys_user");
gr.addQuery("manager",userID);
gr.query();
if(gr.getRowCount>0)
{
is_manager = "true";
}
else{
is_manager = "false";
}
Thankyou.