- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-18-2022 03:41 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-18-2022 03:51 AM
Hi @Chandra31
Create a Business Rule as After Update with below Condition:
Work Notes Changes
var lastWorkNote = current.work_notes.getJournalEntry(-1);
var parentInc = new GlideRecord('incident');
parentInc.addQuery('sys_id',current.parent_incident);
parentInc.query();
if(parentInc.next())
{
parentInc.work_notes = lastWorkNote;
parentInc.update();
}
Thanks
Anubhav Ritolia
ServiceNow Rising Star 2023
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-18-2022 03:51 AM
Hi @Chandra31
Create a Business Rule as After Update with below Condition:
Work Notes Changes
var lastWorkNote = current.work_notes.getJournalEntry(-1);
var parentInc = new GlideRecord('incident');
parentInc.addQuery('sys_id',current.parent_incident);
parentInc.query();
if(parentInc.next())
{
parentInc.work_notes = lastWorkNote;
parentInc.update();
}
Thanks
Anubhav Ritolia
ServiceNow Rising Star 2023
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-18-2022 06:37 AM
you can easily achieve this using flow designer with no script.
Did you explore that?
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-18-2022 03:57 AM - edited 11-18-2022 04:00 AM
Hello,
You can write a after update BR on incident table with condition that parent incident is not empty
And use the below script:-
(function executeRule(current, previous /*null when async*/) {
var gr=new GlideRecord('incident');
(gr.get(current.parent_incident))
{
gr.work_notes=current.work_notes.getJournalEntry(1);
gr.update();
}
})(current, previous);
Please mark my answer as correct based on Impact.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-18-2022 04:02 AM
Hi @Chandra31 ,
You need to create an After Update Business rule
Filter condition as:
Parent Incident - is not empty
Work notes - Changes
Script as:
var parentIncGR = new GlideRecord('incident');
if(parentIncGR.get(current.getValue("parent_incident")){
parentIncGR.work_notes = "Update from Child Incident " + current.getValue("number") + " : " +current.work_notes;
parentIncGR.update();
}
Aman Kumar