- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-21-2022 02:21 AM
We have this approval record.
When users adds comments in the approval record, -->This should update the Parent(Approval for) record.
Like it should be logged in Parent record.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-21-2022 02:24 AM
Hi,
you can use after update BR on sysapproval_approver table
Condition: Comments Changes
Script: Something like this; Enhance it further
(function executeRule(current, previous /*null when async*/) {
// Add your code here
var gr = new GlideRecord(current.source_table);
gr.addQuery("sys_id", current.document_id);
gr.query();
if (gr.next()) {
gr.comments = current.comments.getJournalEntry(1);
gr.update();
}
})(current, previous);
regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-21-2022 02:24 AM
Hi,
you can use after update BR on sysapproval_approver table
Condition: Comments Changes
Script: Something like this; Enhance it further
(function executeRule(current, previous /*null when async*/) {
// Add your code here
var gr = new GlideRecord(current.source_table);
gr.addQuery("sys_id", current.document_id);
gr.query();
if (gr.next()) {
gr.comments = current.comments.getJournalEntry(1);
gr.update();
}
})(current, previous);
regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-21-2022 02:50 AM
Hi,
So, there is no OOB Business rule doing that.
We have to write one custom Business rule for this?