Comments to get copied in Approval Record
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
an hour ago
Hi All,
When we reject the approval from Employee center portal, it's asking for rejection comment, if we give any comment it gets copied to RITM and not to the approval record.
I want the comment should also get copied to approval record. Is there any solution apart from Business rule to get this functionality?
Please provide me your inputs.
Thanks,
Sakshi
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
32m ago
Hi @Sakshi Lambat -
This is OOTB design for the Employee Center and Service Portal. When an end user rejects an approval via the portal, the underlying widgets are specifically designed to save those comments directly to the target record (e.g., the RITM) rather than the sysapproval_approver record. This is done to ensure the requester immediately sees the rejection reason.
Since you want to copy the comment to the approval record and specifically want a solution apart from a Business Rule, here are the best alternative approaches to achieve this functionality
Alternative 1: Flow Designer
If your goal is to avoid traditional scripted Business Rules, Flow Designer is the modern, no-code/low-code alternative to synchronize the records.
You can create a simple Flow that triggers when the RITM is updated:
- Trigger: Set the trigger to Updated on the Requested Item (sc_req_item) table.
- Condition: State changes to Closed Incomplete (or whatever your rejection state is) AND Comments changes.
- Action 1 (Look Up Record): Look up the related Approval (sysapproval_approver) record where the Approving (or document_id) field matches the Trigger Record's RITM, and the State is Rejected.
- Action 2 (Update Record): Update the Approval record found in Action
Alternative 2: Clone and Modify the Portal Widget
Because this behavior is controlled by the Employee Center widget's Server Script (typically the Approval Info or To-dos Approval widget), you can change the source code to write to the approval table instead.
- Navigate to Service Portal > Widgets.
- Find the widget handling your approvals and Clone it (never modify the OOTB widget directly).
- In your cloned widget, locate the Server Script section that processes the "Reject" action.
- Modify the GlideRecord update logic. Instead of (or in addition to) writing the comment to the target RITM, script it to write to the sysapproval_approver record (approvalGR.comments = input.comment; approvalGR.update();).
- Replace the OOTB widget on your Employee Center page with your new cloned widget.
let me know if you have further questions on the above solutions.