How to populate Parent record fields details into Child record

chanikya
Kilo Sage

Hi All,

We created Relationship between RITM and CI, it is working successfully.
Currently when I click on New button RITM Assigned-To values getting populated on CI assigned_to field.
 
Concern/Request  :  I would like to auto-populate RITM record other fields details into CI record fields . when I click on "New" button.

Can Some one please suggest me the how do get it done.

chanikya_0-1754521329993.png

chanikya_1-1754521358910.png

chanikya_2-1754521466355.png
Currently when I click on New button RITM Assigned-To values getting populated on CI assigned_to field.
 
Concern :  I would like to auto-populate RITM record other fields details into CI record fields . when I click on "New" button.

Can Some one please suggest me the how do get it done.




6 REPLIES 6

kaushal_snow
Mega Sage

Hi @chanikya ,

 

Using a before insert Business Rule on the child table lets you auto‑populate fields from the parent RITM when a new record is opened. For example, you can dot‑walk from current.u_parent_request_item.assigned_to or variables using current.parent_field.variable_name. By checking current.isNewRecord() and current.u_parent_request_item is not empty.


current.ci_assigned_to = current.u_parent_request_item.assigned_to;
current.u_some_field = current.u_parent_request_item.variables.some_variable;

> Use dot-walking to copy display or reference values from parent.

 

Try this once and let me know. If you find this helpful, please accept this as a solution and hit the helpful button..

 

 

Thanks and Regards,
Kaushal Kumar Jha - ServiceNow Consultant - Lets connect on Linkedin: https://www.linkedin.com/in/kaushalkrjha/

we no where having direct relation between RITM and CI .

using Assigned to field we created custom Relationship record(sys_relationship.list ). that is the only relation we have. In that case  How can we do dot-walking .  if I want to do dot-walkin I need parent field on CI record right ? we have no any parent field which is referning RITM table. Dotwalking will possible only if we have direct relation between PArent and Child , Like Incident and Incident TASK..

on RITM we have custom field Company that value has to be populated on CI company field. like this want to populated come other varaible information on CI.

Ankur Bawiskar
Tera Patron
Tera Patron

@chanikya 

you will have to store RITM sysId on CI so that other fields can be grabbed.

OR

you will have to override the New button in the related list and pass the information from RITM to CI form

Repurpose the New Button on related list 

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

Hi @Ankur Bawiskar 

How to store RITM number on CI ?
I think from Relationships I can populated ritm assignedTo only on CI assigned to , if I add RITM number in relationship code,there  relation breaking . so i think it is not possible to  populate RITM number from Relationship .

chanikya_0-1754575727916.png

 



I created one Task field(refering Task table) on CI . so please advice me how can I store it.