The CreatorCon Call for Content is officially open! Get started here.

How to sync parent to child incident Assigned to and assignment group

R Charan C
Tera Expert

I have a requirement to sync child incidents (assigned to filed) to parent incident. so every time, I update 'assigned to' in parent incident.

I wrote this below, NOT WORKING. Any help ?

Async, 
Update,

condition: Assigned to changes.

 

(function executeRule(current, previous /*null when async*/) {

    var grIncident = new GlideRecord("incident");
    grIncident.addActiveQuery();
    grIncident.addQuery("parent_incident", current.sys_id+"");
    grIncident.setValue("assignment_group", current.assignment_group+"");
    grIncident.setValue("assigned_to", current.assigned_to+""); // In case you want assinment group emty then comment this and uncomment below line
    // grIncident.setValue("assigned_to", "");
    grIncident.updateMultiple();

})(current, previous);
1 ACCEPTED SOLUTION

Found out the issue, I was looking at the wrong table .
I made BR changes to extended table and looking for Child incidents on Incident table. That's the mistake I made. This should be good.
Thanks for looking in to it. @Bert_c1 

View solution in original post

7 REPLIES 7

My test of your BR as you described, but didn't indicate what table it is configured for, works for me when the table is 'incident'.

Found out the issue, I was looking at the wrong table .
I made BR changes to extended table and looking for Child incidents on Incident table. That's the mistake I made. This should be good.
Thanks for looking in to it. @Bert_c1 

Bert_c1
Kilo Patron

Also, the incident table has a field named 'parent' that References Task and is inherited from task. And there is the 'incident_parent' field on the incident table is a Reference field to 'incident'.  you need to post complete details on your business rule.