Additional approvers script
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-18-2017 10:46 AM
I have a variable on the catalog form; Business Unit CFO Approver (value is cfo_approver). It's a reference to a table that has a list of the CFO's.
In my workflow, I want to include the CFO as an approver. In a Approval - User activity, I used the additional approvers script and added:
answer = current.variables.cfo_approver;
This is not working. Please help.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-18-2017 10:54 AM
Hi Chris,
I guess, you have used Approval -User activity. Please check 'Advanced' and in the script write the below lines:
answer = [];
answer.push(current.variables.cfo_approver.toString());
I hope this helps.Please mark correct/helpful based on impact
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-18-2017 11:15 AM
Thanks.
Unfortunately this did not work. It's just bypassing the approval step and automatically approving it.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-18-2017 08:20 PM
Hi Chris,
In that case I would request you to cross check that the selected user's profile. Make sure that the user is Active (Active is Checked) and not Locked out (Locked out is Unchecked).
I hope this helps.Please mark correct/helpful based on impact
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-20-2017 11:14 PM
Hi chrisdamico,
Did you able to have a look at my last response?
If I have answered your question, please mark my response as correct so that others with the same question in the future can find it quickly and that it gets removed from the Unanswered list.
If you are viewing this from the community inbox you will not see the correct answer button. If so, please review How to Mark Answers Correct From Inbox View
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-21-2017 08:01 AM
Yes and here is what's going on.
I put the log statement in the Additional Approvers script to help troubleshoot.
gs.log("current cfo approver "+ current.variables.cfo_approver);
var answer = [];
answer.push(current.variables.cfo_approver);
It's returning the sysid of the wrong field so hopefully you can help me out. Here is the reference table. It's returning the sysid of the business unit field and not the user field.