To Display parent field value in child field

bumineela balan
Tera Contributor

Requirement:

1.There are two tables , parent table(sn_customerservice_case),child table (sn_customerservice_task)

2.Both have assigned_to field

3.When case is assigned to some one, it should also reflect the same in ,child table (assigned_to)

How can i achieve this in reference qualifier?

Thanks in advance

16 REPLIES 16

Yes, tried with BR.Its not working.

How can it be achieved through reference qualifiers

Thanks

servicenow lath
Tera Contributor
Is this possible to do in workflow? To copy fields from parent case to childcase table?

yes it is possible. you can write a run script and check if he current record has parent. if yes, you can gliderecord the parent and fetch the values and assign to current object.

Can u give me a scripte for that if iam creating a parent case record and i need to copy all the field value to child case in workflow

asifnoor
Kilo Patron

Hi,

The refrence qualifier is used to set the prefilter to select the values from. you cannot set the value in the field using reference qualifier.

For your requirement,you should write an after update BR on the sn_customerservice_case with conditions assigned_to changes AND assigned_to is not empty.

Then in advanced script query the child tables and set the assigned to.

//sample script
var gr = new GlideRecord("sn_customerservice_task");
gr.addQuery("parent",current.sys_id); //assuming parent is the righ tfield
gr.query();
while(gr.next()) {
 gr.assigned_to=current.assigned_to;
 gr.update();
}

Kindly mark the comment as a correct answer and also helpful if this has answered your question.