- 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-30-2021 11:07 AM
Best practice is to never user current.update(). Note that this is a before BR so the update statement is not required.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-30-2021 03:08 PM
current.update() is only use on "after" BR is that right?
How about the current on meeting dates. I can use it there right?
current.meeting_start_date = gr.meeting_start_date;
current.meeting_end_date = gr.meeting_end_date;

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-30-2021 04:06 PM
If the BR is running on the table you are updating you should use a before BR. Using current.update will cause all other BRs to run and you could get caught in a loop. Current on any field is fine you just don't want to use current.update to update them for the reason stated earlier.

- 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-30-2021 03:05 PM
Finally got it to work. Couldn't have done it without all your help. Thank you so.......... much everyone!