Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-27-2024 12:47 PM
With In Workflow Editor, we use this If Script below, to check if the Requested For is a manager, if they are then no Approval is Required, If Not a manager will ask for the Requested for Manager to Approve.
How can I do the same in Flow Designer?
answer = ifScript();
function ifScript() {
var openid = current.opened_by.toString();
var manid = current.request.requested_for.toString();
var gr = new GlideRecord('sys_user');
var grOR = gr.addQuery('manager', openid);
grOR.addOrCondition('manager', manid);
gr.query();
if (gr.hasNext()) {
return 'yes';
}
}
Solved! Go to Solution.