
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-21-2018 06:24 PM
Hi All,
Having some simple issues with my workflow and wondered this is working by design, something I've done wrong, or is a bug in the system.
I have a simple workflow to generate 2 approval records, request manager approval (via script) and then one-up manager approval (also via script). The two approver activities are essentially identical, they only point to a different field. See workflow and activity screenshots below:
The requirement should also for a person to open a HR Case for someone else, hence the 'requester' can be different, but this still doesn't create the correct approval tasks.
Can anyone help me figure out why the approvals aren't generated if the 'opened_by' matches the person the approval is being requested from?
Much appreciated.
Solved! Go to Solution.
- Labels:
-
Service Portal
-
Workflow

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-07-2018 05:57 PM
In the end what I did here was to add validation to the Record Produce to disallow the user to put themselves as the approvers. I added a Catalogue Client Script, OnSubmit, to throw up an error and stop the save from occurring.
The original problem around the approval tasks no appearing was the BR shown in a previous update, this is still needed for the Change process where people sit in multiple groups but cannot approve their own changes.
Thanks for all your help with this.
Cheers
Carl.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-21-2018 06:33 PM
your approval script is correct.before approval activity there is something called generate..whatz dat?
can you log your variable in approval activity and check?
Harish

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-21-2018 06:48 PM
the 'generate' activity generates all the approval records up front, not just when they are needed in the workflow - it provides visibility to the requester what approvals there are in the queue.
How do I log my variable into the approval activity?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-21-2018 06:51 PM
gs.log("My Approver"+current.variables.yourvariablename);
in your approval script add this line and check in logs what value your getting
Harish

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-21-2018 06:35 PM
You may want to check if the field you are pulling from (requester's manager) has data. In the past, I've seen approvals skipped when there is no data returned, like an approval group which has no members.