Why does todos_approval_actions save the comment tot the target record?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-12-2022 07:34 AM
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.
- 1,562 Views
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-16-2022 10:01 AM
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 as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-16-2024 12:11 PM
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-31-2024 07:34 PM
It's working for me on Vancouver.