I want to copy short description and description of parent whenever we click on new child incident?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-13-2025 01:38 AM
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?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-13-2025 01:50 AM
Hi @Prathamesh Chav ,
Check this, similar question is answered here
Solved: Sending Field Values when Clicking New Button of R... - ServiceNow Community
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-13-2025 01:55 AM
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 as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-13-2025 01:55 AM
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
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-13-2025 02:11 AM
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.