- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-09-2023 06:43 PM
I have a child and parent incident and I want to have them both synchronized especially to these 3 fields (state, priority, notes).
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-09-2023 10:32 PM
Hi @zaxjun ,
If you want synchonize parent and child incident means ,You need to write a business rule in Incient.
1.Child to Parent
var childToParent = new GlideRecord('incident');
if (childToParent.get(current.parent)) {
childToParent.state = current.state;
childToParent.priority = current.priority;
childToParent.work_notes = current.work_notes;
childToParent.update();
}
2.Parent to child
- Incident have OOB business rule called "Update Child Incidents",In this business rule you can add additional fields to updation from parent to child.
Thank you.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-09-2023 09:15 PM - edited 10-09-2023 09:15 PM
Hi @zaxjun ,
To synchronize fields between parent and child incidents in ServiceNow, you can use Business Rules or Workflow Rules. Here's how you can achieve this using Business Rules:
### Using Business Rules:
1. **Create a Business Rule on the Child Incident Table:**
- Navigate to "System Definition" > "Business Rules" in the application navigator.
- Click on "New" to create a new Business Rule.
- Configure the Business Rule to run on the child incident table.
- Set the condition when the rule should run (for example, when state, priority, or notes fields change).
2. **Define the Business Rule Script:**
- Write a script to update the corresponding fields in the parent incident based on changes in the child incident.
- Here's an example script to synchronize `state`, `priority`, and `notes` fields:
(function executeRule(current, previous /*null when async*/) {
var parentIncident = new GlideRecord('incident');
if (parentIncident.get(current.parent)) {
parentIncident.state = current.state;
parentIncident.priority = current.priority;
parentIncident.work_notes = current.work_notes; // Synchronize notes field
parentIncident.update();
}
})(current, previous);
In this script, `current` represents the child incident record being updated. It checks the parent incident (`current.parent`), updates `state`, `priority`, and `work_notes` fields in the parent incident based on changes in the child incident.
3. **Configure the Business Rule Actions:**
- Set the order of the Business Rule to ensure it runs after changes are made to the child incident.
- Save the Business Rule.
Now, whenever the `state`, `priority`, or `work_notes` fields of the child incident change, the corresponding fields in the parent incident will be synchronized.
Remember to test this in a non-production environment first to ensure it works as expected in your specific ServiceNow configuration.
Mark my answer helpful & accepted if it helps you resolve your issue.
Thanks,
Danish
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-09-2023 09:20 PM
Hello Danish, Good day! Thanks for your answer but it's the other way around. When updating the parent incident ticket, it should cascade to its child tickets. They should not be able to update the parent by updating the child ticket.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-09-2023 09:21 PM - edited 10-09-2023 09:22 PM
have a look at this SnGuru post this might help
https://servicenowguru.com/scripting/business-rules-scripting/checking-modified-fields-script/
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-09-2023 10:32 PM
Hi @zaxjun ,
If you want synchonize parent and child incident means ,You need to write a business rule in Incient.
1.Child to Parent
var childToParent = new GlideRecord('incident');
if (childToParent.get(current.parent)) {
childToParent.state = current.state;
childToParent.priority = current.priority;
childToParent.work_notes = current.work_notes;
childToParent.update();
}
2.Parent to child
- Incident have OOB business rule called "Update Child Incidents",In this business rule you can add additional fields to updation from parent to child.
Thank you.