Flow designer rejection comments

kali
Tera Contributor

Hi All,

I am using flow designer in hrsd , it send approvals to one or two approvers.  I need to capture the rejection comments of the approver.  I used look up record , but sometime same  rejection comments are copied to hr case two times, if there are only one approvers. Kindly suggest how to copy the rejection comments .

1 REPLY 1

Vijay Balotia1
Tera Guru

Hi @kali,

 

For first please check in you ask for approval action have you select if anyone approve, anyone reject option.

 

Second when any approver reject the approval request, for all other approver approval request will by default update to No Longer required, in your lookup record you can add one more condition state is not No Longer Required. Doing this it will get update from your correct approval request.

 

Second possibilities is there might be multiple comments on reject approval request in that case you need to capture only the latest reject comment for this you can use the below script.

var worknotes = current.work_notes.getJournalEntry(1);  // In place of current use your object.

var onlyNotes = worknotes.split("(Work notes)\n");

 var lastWorknote = onlyNotes [1];

 

Please mark the appropriate response as correct answer and helpful, This may help other community users to follow correct solution.
Thanks
Vijay Balotia