- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-29-2021 01:56 PM
Hello everyone,
My use case is in my parent form, I have meeting start and end date fields where the end user select the dates.
I also have the same fields in my child form. How do I copy the start and end date from the parent to child form when the record is insert or update so that those dates will show up in the child form as well?
Thanks
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-30-2021 11:11 AM
try this is scripts background.
var gr = new GlideRecord('x_531698_bod_syst_director_requests');
gr.addQuery('sys_id', 'sysid'); //repleace sysid with a sysid from one of your parent records.
gr.query();
if (gr.next()){
gs.info(gr.number);
}

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-29-2021 03:22 PM
I would do a before insert/update BR on the child table. This is making some assumption like that they field names are.
var gr = new GlideRecod('parent table');
gr.addQuery('sys_id', current.parent);//you will need to repace parent with the correct field name if parent is not the field on the child record.
gr.query();
if (gr.next()){
current.start_date = gr.start_date.getDisplayValue();
current.end_date = gr.end_date.getDisplayValue();
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-29-2021 04:01 PM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-29-2021 04:47 PM
On the child table do you have a reference field to the parent table? It may not be called parent. For example on the sc_task table the reference field to the parent is called request_item. Also since this is a before business rule you should not current.update() as it is not needed and cause other BRs to trigger again.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-29-2021 05:57 PM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-29-2021 11:34 PM
If you add parent to the list layout does it have the correct info in it. AKA the correct number and if you click on it does it take you to the parent?