Capture Last Comment

jmiskey
Kilo Sage

I added a field to my Approval table (sysapproval_approver) called "Last Comment".  Whenever a comment is added (like a rejection reason), I want it to populate this new "Last Comment" field.

So, I am trying to create a Business Rule that will update the "Last Comment" field.  I can set up the Condition like this:

find_real_file.png

I was then trying to tell it to make the "Last Comment" field the same as the "Comment" field, but it does not look like this is an option. 

find_real_file.png

I am guessing that I will need a script.  What would that look like?

Thanks

 

1 ACCEPTED SOLUTION

Prateek kumar
Mega Sage

Check advanced check box and write this script

current.last_comment_field_name = current.comments; // change u_ticket_last_status as per your field name


Please mark my response as correct and helpful if it helped solved your question.
-Thanks

View solution in original post

3 REPLIES 3

Prateek kumar
Mega Sage

Check advanced check box and write this script

current.last_comment_field_name = current.comments; // change u_ticket_last_status as per your field name


Please mark my response as correct and helpful if it helped solved your question.
-Thanks

jmiskey
Kilo Sage

Thank you.

That was surprisingly simple.  I think I was overthinking it and was trying to make it harder that it needed to be!

No Worries. Glad i was able to help. Cheers!


Please mark my response as correct and helpful if it helped solved your question.
-Thanks