- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-22-2022 04:02 AM
BR to Create a new record in child table based on a field in parent table?
Thanks in Advance.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-22-2022 04:08 AM
Hello ,
yes you can do it though a after update BR on parent table
where you condition can be like state changes (Example)
You can specify your condition and in script you can insert a record in child table
var gr = new GlideRecord('your_child_table_name');
gr.initialize();
gr.field_holding_parent_record = current.sys_id;
gr.insert();
Some thing like this you can do
Hope this helps
Mark my answer correct if this helps you
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-22-2022 04:08 AM
Hello ,
yes you can do it though a after update BR on parent table
where you condition can be like state changes (Example)
You can specify your condition and in script you can insert a record in child table
var gr = new GlideRecord('your_child_table_name');
gr.initialize();
gr.field_holding_parent_record = current.sys_id;
gr.insert();
Some thing like this you can do
Hope this helps
Mark my answer correct if this helps you
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-22-2022 04:13 AM
Yeah, tried this but it is creating 2 records in child table, When should I run this BR?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-22-2022 04:16 AM
whats your requirement ?
like should it insert the record when your field on your parent table changes to some value?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-22-2022 04:18 AM
The requirement is when the field on parent record changes to some value, new record in child table should get created.