FLow designer Approval

Rajeevreddy
Tera Expert
//we want to send approval to group manager and manager's manager . how to achieve this using flow designer ask for approva;


(function() { var approvers = ''; var grp = new GlideRecord('sys_user_group'); if (grp.get('90dd4dc3db731200fed3b33fdf961917')) { var mgr = grp.getValue('manager'); if (mgr) { approvers = mgr; var usr = new GlideRecord('sys_user'); if (usr.get(mgr)) { var mgr2 = usr.getValue('manager'); if (mgr2) approvers += ',' + mgr2; } } } return 'ApprovesAll[' + approvers + ']RejectsAny[' + approvers + ']'; })();

 

6 REPLIES 6

Itallo Brandão
Giga Guru

Hi @Rajeevreddy ,

 

To help us fix this, could you clarify exactly how it is not working?

  1. Does the Flow execution show an Error state (Red)?

  2. Or does it finish successfully, but the Approvers list is empty?

  3. In the Flow Execution Details, did you check if that specific Group SysID actually exists in the instance you are testing?

Let us know these details so we can provide the correct fix.

Best regards, Brandão.

It is skipping and approvers are empty