Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-25-2020 06:52 AM
Hi,
When is this rule running (the one you've added) on insert? It's best practice to be using maintenance rules on the alert table rather than business rules due to the data turn over that occurs.
Regarding your direct requirements, the following BR will update the u_triage_sla_time of the current (i.e parent) record along with its child records.
(function executeRule(current, previous /*null when async*/) {
// Add your code here
var gdt = new GlideDateTime();
current.setValue('u_triage_sla_time', gdt);
var secondaryGR = new GlideRecord(current.sys_class_name);
secondaryGR.addQuery('parent',current.getUniqueValue());
secondaryGR.query();
while(secondaryGR.next()){
secondaryGR.setValue('u_triage_sla_time',gdt);
secondaryGR.update();
}
})(current, previous);