Copy values from parent to Child incident

Soumya Thareja1
Giga Expert

Hi Experts,

On creating a child incident using the 'New' UI action in the incident related lists, I want the child to have some fields like Description, Short Description, etc copied from its parent record. 
I see there an OOTB UI action, but not sure where to add my function in the existing script.

find_real_file.png

Some guidance would be appreciated. 

1 ACCEPTED SOLUTION

Hi Allen, 

I created only a display BR and updated the fields like below:
current.short_description = current.parent_incident.short_description;
current.category= current.parent_incident.category;
current.subcategory= current.parent_incident.subcategory;
current.business_service= current.parent_incident.business_service;

 

It worked that way. 

Thanks a lot though! 🙂

View solution in original post

10 REPLIES 10

Allen Andreas
Administrator
Administrator

Hi,

This would actually have to be handled on the new record itself, through using something like a display Business Rule. See this thread for explanation/example: https://community.servicenow.com/community?id=community_question&sys_id=0ae84f9edba1db444837f3231f96...

Please mark reply as Helpful/Correct, if applicable. Thanks!


Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!

Hi Allen,

This works only if I create the child incident using the hamburger icon, but not when I create it using the UI action. 

Hello,

The method mentioned above works when clicking the "New" button. Please read the correct answer marked in that thread. I've given you the link above.

Please mark reply as Helpful/Correct, if applicable. Thanks!


Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!

Hi Allen, 

I created only a display BR and updated the fields like below:
current.short_description = current.parent_incident.short_description;
current.category= current.parent_incident.category;
current.subcategory= current.parent_incident.subcategory;
current.business_service= current.parent_incident.business_service;

 

It worked that way. 

Thanks a lot though! 🙂