Why does todos_approval_actions save the comment tot the target record?

MarkWe
Tera Guru

While working on some issues with approval-comments, we noticed that when end-users approve / reject a request using ESC, the comments are directly saved to the target record.

This is different from when a request is approved / rejected from the platform UI, where the comment is saved in the sysapproval_approver-table.

I'm a bit confused as why there is a difference between these two methods.

 

What we observe

Action: End user rejects approval for a RITM (sc_req_item) using ESC via the todos_approval_actions widget
Result: The sysapproval_approver record is changed to state = rejected. The comment is added to the sc_req_item-record.

Action: User rejects approval using the platform UI on the same RITM (sc_req_item)
Result: The sysapproval_approver record is changed to state = rejected AND the comment is added to that record. A business rule than copies the comment to sc_req_item.

 

But why? Why is the comment by default added to the target record, and not to the sysapproval_approver table?
This seems to also complicate ACL's on every target table, as todos_approval_actions uses GlideRecordSecure to save the comment.

7 REPLIES 7

Thank you for sharing. Working perfectly.

Figured I'd mention on that second replacement from commentGr to approvalGr (for the approval), be sure to change your gs.getMessage to 'reason for approval'

😃

...I accidentally just copied/pasted 

approvalGr.comments = gs.getMessage('Reason for rejection: {0}', request.comments);

twice and then realized I had the rejection message 'Reason for rejection' but for the approval comment.

 

Jesse

Mark, 

 

Can you confirm this is still working today? I am on a Utah instance and this does not seem to be working for me anymore but would love to hear if you're still seeing success. 

It's working for me on Vancouver.