- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-13-2025 12:06 AM
Copy the work notes of child to its Parent.
I have written this code:--|
after update
Condition : Worknote changes.
Thanks in advance.
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-13-2025 12:11 AM - edited 01-13-2025 12:14 AM
@purnendu Please update your script as follows.
(function executeRule(current, previous /*null when async*/ ) {
// Add your code here
var incGr = new GlideRecord('incident');
incGr.addQuery('sys_id', current.parent.sys_id); //fetch the parent incident matching with sys_id
incGr.addQuery('state', '!=', '7');
incGr.query();
while (incGr.next()) {
incGr.work_notes = current.work_notes.getJournalEntry(1);
incGr.update();
}
})(current, previous);

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-13-2025 12:11 AM - edited 01-13-2025 12:14 AM
@purnendu Please update your script as follows.
(function executeRule(current, previous /*null when async*/ ) {
// Add your code here
var incGr = new GlideRecord('incident');
incGr.addQuery('sys_id', current.parent.sys_id); //fetch the parent incident matching with sys_id
incGr.addQuery('state', '!=', '7');
incGr.query();
while (incGr.next()) {
incGr.work_notes = current.work_notes.getJournalEntry(1);
incGr.update();
}
})(current, previous);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-13-2025 12:15 AM
@Sandeep Rajput Thank you so much Sandeep.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-13-2025 12:16 AM
@purnendu Thanks a lot for accepting the response. Please mark it helpful too.