Approval Chains
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-07-2013 08:30 AM
we have a requirement to gather approvals for all managers up to a certain point.
I have tried creating an IF -> Approval User loop in the workflow, but I've noticed two things. 1) the if statement isn't working after the first check, and 2) the approval user activity isn't generating new approvals after the first one. Or it's deleting the previous approvals associated to it.
Any ideas how I should implement this?
- Labels:
-
Service Mapping

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-04-2020 11:37 PM
Can you post the exact code you are reffering to?
My feeling is that you need the sys_id instead of the name.
Best
Daniel
If this answer was helpful, I would appreciate if you marked it as such - thanks!
Best
Daniel
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-05-2020 07:40 AM
I've attached a picture of the portion of the workflow in question. the flow seems to be working except for the last approval where it loops back to the IF statement. The code I have is below:
var grUser = new GlideRecord('sys_user');
grUser.get(workflow.scratchpad.current_manager);
var answer = [];
answer.push(grUser.manager.name);
workflow.scratchpad.current_manager = grUser.manager.sys_id;
Right now it skips the approval, loops back to the if but gets stuck because there is no user to assign the approval to.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-06-2020 08:54 AM
Any ideas on a fix for my script? I'm at a loss here.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-10-2020 09:37 AM
Its very hard to say, based on the clipping you posted.
Are you shure the If statement evaluates to "No"? (I assume this is the branch where your second approval kicks in).
Also, you want to be careful: is it OK if your CEO suddenly gets approvals?
We use a function here to limit the level of the approving manager to some maximimum.
Best
Daniel
If this answer was helpful, I would appreciate if you marked it as such - thanks!
Best
Daniel