" answer = 'rejected' " is not working

DoDo labs___
Mega Sage

Hello, 

 

I have created an Approval - User in a workflow.
In the sript, if the approver is empty, it should be rejected.
The comment is appear, but even so approved.

 

part of the script:

 

if (answer[1] == '')
{
current.comments = 'Nincs Company SM, ezért az igény elutasításra került.';
answer = 'rejected';
}

 

2 REPLIES 2

Brad Bowman
Kilo Patron
Kilo Patron

In an Approval - User activity, answer is set to the sys_id of user(s) to approve.  With what you are trying to do, use

activity.result == 'rejected';

Unfortunately it still doesn't work. 😞