- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-26-2024 08:23 AM
Hi All,
I have created the workflow in that we have to check logged in user(requester) "is manager" check box is true or false , if the requester "is manager" is true then we don't need approval, if the requester "is manager" check box is false that need approval so I have added the activity is "if" condition in that I have write the script..
Regards,
Haresh
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-26-2024 08:30 AM - edited ‎03-26-2024 08:34 AM
Hi,
Try this
var records = new GlideRecord('sys_user');
records.addQuery('manager', gs.getUserID());
records.addActiveQuery();
records.setLimit(1);
records.query();
if (records.next()) {
return true;
}
return false;
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-26-2024 08:30 AM - edited ‎03-26-2024 08:34 AM
Hi,
Try this
var records = new GlideRecord('sys_user');
records.addQuery('manager', gs.getUserID());
records.addActiveQuery();
records.setLimit(1);
records.query();
if (records.next()) {
return true;
}
return false;
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-26-2024 08:32 AM
So what is the question here?