Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-25-2025 02:03 AM
How can I populate the Comments field on the sc_task record with comments from related approval records in ServiceNow?
Thanks
Solved! Go to Solution.
1 ACCEPTED SOLUTION
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-25-2025 02:07 AM
Hi Anshul,
use after update BR on approval table and past this code in advance section.
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();
}
My Solution is helpful and accepted.
1 REPLY 1
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-25-2025 02:07 AM
Hi Anshul,
use after update BR on approval table and past this code in advance section.
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();
}
My Solution is helpful and accepted.