how to write a business rule for parent table..?which runs for all child table on update on any in child tables..

Naveen Kokkirap
Tera Contributor

need to write business rule. for entity which has applies to record field it is dependent on tables.. 

when we trying add any cmdb_ci(parent table) tables the field owner will be  populated in an entity owner field,..

for this we need to write BR for parent tables... any Script ideas

1 REPLY 1

Harish KM
Kilo Patron
Kilo Patron

You can glide child table from parent example below 

Incident --> parent

incident task -->child

BR on incident table

    var inc= new GlideRecord("incident_task");
inc.addQuery("incident",current.getValue("sys_id")); // relation between incident and incident task (reference field)
inc.query();
while(inc.next())

{
//do what you want
}

Regards
Harish