Currently I have this custom function that runs when specific conditions apply.
But the problem is that the Request template is also set to send to $REPORTING_TO$
This means that it will add all three to the same approval stage.
How can I add a new stage with a custom name that is after the default $REPORTING_TO$ stage?
OR how can I override the default $REPORTING_TO$ approval with the ones supplied here?
- approversCSV = {"approver-email-address","approver-email-address2"};
- // Build return-JSON
- returnjson = {
- "operation": [
- {
- "INPUT_DATA": approversCSV,
- "OPERATIONNAME": "ADD_APPROVAL",
- "send_immediately": "true"
- }
- ],
- "message": "Adding and sending approval to " + approversCSV,
- "result": "success"
- };
- return returnjson;