- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-31-2025 03:11 AM
We use the Case management for our customers.
Upone adding a "parent" i'd like to mark the parent as "Problem case".
This works just fine with a workflow.
BUT: i'd like the Activities (especially Field changes) to be updated with the appropriate field change on the parent case.
How can I achieve this?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-02-2025 11:43 PM
the solution was quite simple:
in the normal GUI (not workspace) I can configure which fields are displayed in "field changes"... so I added the field in question (category) and voilà

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-31-2025 04:11 AM
Hi,
Can you try following code in BR on the table you’re using for your cases.
Script:
You add a trigger condition as field_name is changes.
(function executeRule(current, previous /*null when async*/) {
// Check if the Parent Case exists
if (current.parent) {
var parentCase = new GlideRecord('case');
if (parentCase.get(current.parent)) {
var activity = new GlideRecord('case_activity');
activity.initialize();
activity.case = parentCase.sys_id;
activity.activity_type = 'Field Change'; // Set type to Field Change or any other type
activity.field_name = current.field_name; // Field that was changed
activity.old_value = previous.field_name;
activity.new_value = current.field_name;
activity.insert();
}
}
})(current, previous);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-31-2025 04:31 AM
you can sync the fields using after update BR on Case table
Condition: Field1 Changes AND Parent is not empty
// your code to copy field values
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-02-2025 05:31 AM
Hope you are doing good.
Did my reply answer your question?
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-31-2025 04:49 AM
Hi @MichaelZischeck ,
You can create before BR and use below script.
(function executeRule(current, previous /*null when async*/) {
if (!current.parent) {
return; // Exit if there's no parent case
}
var parentCase = new GlideRecord('sn_customerservice_case');
if (parentCase.get(current.parent)) {
var changedFields = [];
// Compare fields and log changes
if (current.state != previous.state) {
changedFields.push("State changed from " + previous.state.getDisplayValue() + " to " + current.state.getDisplayValue());
parentCase.state = current.state; // Sync state
}
if (current.assignment_group != previous.assignment_group) {
changedFields.push("Assignment Group changed from " + previous.assignment_group.getDisplayValue() + " to " + current.assignment_group.getDisplayValue());
parentCase.assignment_group = current.assignment_group;
}
if (changedFields.length > 0) {
var updateMessage = "Updated due to child case changes:\n" + changedFields.join("\n");
parentCase.work_notes = updateMessage;
parentCase.update();
}
}
})(current, previous);
-------------------------------------------------------------------------
If you found my response helpful, please consider selecting "Accept as Solution" and marking it as "Helpful." This not only supports me but also benefits the community.
Regards
Runjay Patel - ServiceNow Solution Architect
YouTube: https://www.youtube.com/@RunjayP
LinkedIn: https://www.linkedin.com/in/runjay
-------------------------------------------------------------------------