I want to copy short description and description of parent whenever we click on new child incident?

Prathamesh Chav
Tera Contributor

Hi Team,

 

After parent is getting created we are clicking on new child record,

and when we click on new it should fetch parent short_des and Description.

 

Can anyone help me in this?

6 REPLIES 6

Anurag Tripathi
Mega Patron
Mega Patron

SN_Learn
Kilo Patron
Kilo Patron

Hi @Prathamesh Chav ,

 

Please check the below references:

Populate Fields When Clicking New in Related List 

Sending Field Values when Clicking New Button of Related List 

 

----------------------------------------------------------------
Mark this as Helpful / Accept the Solution if this helps.

Ravi Gaurav
Giga Sage
Giga Sage

Hi @Prathamesh Chav 

 

You can create a BR (Before Insert prefebally)and write a logic below :-


// Check if the incident has a parent
if (current.parent) {
// Get the parent record
var parentIncident = new GlideRecord('incident');
if (parentIncident.get(current.parent)) {
// Copy the short description and description from parent to child
current.short_description = parentIncident.short_description;
current.description = parentIncident.description;
// Optionally, you can also copy other fields if needed
}

--------------------------------------------------------------------------------------------------------------------------


If you found my response helpful, I would greatly appreciate it if you could mark it as "Accepted Solution" and "Helpful."
Your support not only benefits the community but also encourages me to continue assisting. Thank you so much!

Thanks and Regards
Ravi Gaurav | ServiceNow MVP 2025,2024 | ServiceNow Practice Lead | Solution Architect
CGI
M.Tech in Data Science & AI

 YouTube: https://www.youtube.com/@learnservicenowwithravi
 LinkedIn: https://www.linkedin.com/in/ravi-gaurav-a67542aa/

Ankur Bawiskar
Tera Patron
Tera Patron

@Prathamesh Chav 

there are multiple ways to do this

1) before insert BR on child table

OR
2) display BR on child table and get the value from parent reference field and set

what did you try so far and what didn't work?

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