Approval comment

Misgun
Tera Contributor

I want to add the comments given in an approval record to record on the approval for field.

1 ACCEPTED SOLUTION

Misgana
Tera Guru

Hello @Misgun,

Try creating a BR on the approval table with an update condition, and state = Requested as a condition if you want to send the comments given when the case is rejected to add another condition using the OR operator state = Rejected.

In the script dot-walk to the record on the approval field pointing to the comments field.

In order to get the comment given in the approval record use the script below

current.comments.getJournalEntry(1).trim(); //this is to get the last comment 

current.comments.getJournalEntry(-1); //this is to get all the comments

 

Once you get the comment pass it to a variable and then pass it to the dot-walked field comments on the approval for field.

 

If this helps you address the issue please mark it as helpful and accept as a solution. 

 

 

View solution in original post

1 REPLY 1

Misgana
Tera Guru

Hello @Misgun,

Try creating a BR on the approval table with an update condition, and state = Requested as a condition if you want to send the comments given when the case is rejected to add another condition using the OR operator state = Rejected.

In the script dot-walk to the record on the approval field pointing to the comments field.

In order to get the comment given in the approval record use the script below

current.comments.getJournalEntry(1).trim(); //this is to get the last comment 

current.comments.getJournalEntry(-1); //this is to get all the comments

 

Once you get the comment pass it to a variable and then pass it to the dot-walked field comments on the approval for field.

 

If this helps you address the issue please mark it as helpful and accept as a solution.