How to get mandatory approvals from two people in a workflow and until the two of them approve, it should be 'Requested' and once both of them approve then only it should be 'No longer required'.

utkarsha_s
Kilo Expert

Hi Guys,

Let me know how to get mandatory approvals from two people in a workflow and until the two of them approve, it should be 'Requested' and once both of them approve then only it should be 'No longer required'. If the first person has approved, still it should be in Requested state until one more person approves and then no longer required.

How do I achieve this from a workflow ?

Thanks,

Utkarsha Saxena

1 ACCEPTED SOLUTION

Hi,


Try following code in approval activity of your workflow.



find_real_file.png




Raj


View solution in original post

26 REPLIES 26

Can you try with Approval User activity


Hi,



I tried the same on my dev instance and it worked.


Can you please share the screenshot of the apporval activity where you are setting these conditions?



find_real_file.png




Raj


Hi Raj,


Please find the image screenshots I have put.


1.png



2.png



3.png



4.png


Hi,



There are 2 methods.



1) You need to use Approval User activity (if there is only a single group is involved).   My script will work in this method. You are currently using Approval Group.


2) You need to use Approval Group activity (if there are multiple groups are involved). In this case try following script


var id=0;


for (var id in groups) {


var group = groups[id];


if ( group.approved ==2)


{


answer='approved';


}


}


Plz set the for loop depending on number of groups involved.



Raj


Hi Raj,



Yes I made that script on approval user activity and it worked. Thanks a lot. Now this works for me as well ! Appreciate all the help and patience !



Regards,


Utkarsha