Copy filed values from Child incident to parent incident
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-30-2024 01:10 AM
Hi team,
The subject line is bit confusing but the required functionality is that only. We have incidents and an UI action called 'Approve Major Incident' to create a major incident with that respective incident. Then, the initial incident becomes child and the new major incident is the parent. We have a parent field on the child incident showing the incident id . Requirement is to copy the field values of child incident(initial incident) to the newly created major incident(parent).
There is a mixture of reference and text fields. I need help on script of the business rule for this requirement.
Thanks in Advance
Souvick

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-30-2024 01:18 AM
@Souvick6917 Instead of creating a business rule, you can simply utilise the Approve Major Incident UI Action where you are creating a major incident, set the values from the current record on the new major incident record you are creating.
Your UI Action script could like like the following.
var majorIncident = new GlideRecord('incident');
majorIncident.initalize();
majorIncident.short_description = current.short_description+'';
majorIncident.description = current.description+''; //similarly set the other fields.
current.parent = majorIncident.insert(); //insert the major incident here
current.update();
Hope this helps.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-30-2024 01:42 AM
The issue here is the UI action is in a different scope and we dont want to modify the code as it has been used in number of other places. I want to achieve this part as after business rule. Can you help me on the coding as my code is working.