Manager Approval in the workflow

sonita
Giga Guru

There is a field on the change form called Requested by (requested_by).

find_real_file.png

In the workflow I need to have manager's approval . in fact manager is requested by's manager.

find_real_file.png

This is my code for manager approval which is wrong and it gives error:

I also tried approver=current.variables.requested_by.manager;

Any ideas?

find_real_file.png

1 ACCEPTED SOLUTION

Hi Soni,



Can you please use the below script and let me know. I believe this is from one of Change request workflow. Please let me know if you find any issue.


var answer = [];


answer.push(current.requested_by.manager);



I hope this helps.Please mark correct/helpful based on impact


View solution in original post

4 REPLIES 4

amlanpal
Kilo Sage

Hi Soni,



Just use the script as below:


var approver = current.requested_by.manager.toString();


answer = [];


answer.push(approver);



I hope this helps.Please mark correct/helpful based on impact


Hi It didn't work . still i get errors


Hi Soni,



Can you please use the below script and let me know. I believe this is from one of Change request workflow. Please let me know if you find any issue.


var answer = [];


answer.push(current.requested_by.manager);



I hope this helps.Please mark correct/helpful based on impact


Thanks! it works!