- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-15-2021 02:27 PM
I have a child table that is on the parent's form as a related list. When I click "New", I want the key of the Parent record currently displayed to be displayed/stored on the child record. How do I get the parent's sys_id into the child record?
Solved! Go to Solution.
- Labels:
-
Scripting and Coding

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-15-2021 03:34 PM
Even with custom tables this will work.
Take the following example relationship:
On the 'My Custom Table' record you have a related list and that related list's name is My Custom Child Table > My Custom Table.
When you click new in the related list, the Parent field on the My Custom Child Table will automatically be populated.
To see an example of this in an OOTB incident record, select the 'Child Incidents' Related list and click New. On the record that shows up, you'll see that the 'Parent incident' field is pre-populated with parent record you've just come from.
As I said above, this is just standard functionality across the platform, regardless of whether you are using custom tables or not. Full documentation on Related Lists can be seen here.
Callum

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-15-2021 02:55 PM
This is default functionality on the platform, you shouldn't need to do anything. Check the related list to see what field the relationship is based on, that field will automatically populate on the new child record.
The only exception to this is where the relationship is a custom relationship.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-15-2021 03:18 PM
I am using custom tables. How do I do it, since I am using custom tables?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-15-2021 03:34 PM
Even with custom tables this will work.
Take the following example relationship:
On the 'My Custom Table' record you have a related list and that related list's name is My Custom Child Table > My Custom Table.
When you click new in the related list, the Parent field on the My Custom Child Table will automatically be populated.
To see an example of this in an OOTB incident record, select the 'Child Incidents' Related list and click New. On the record that shows up, you'll see that the 'Parent incident' field is pre-populated with parent record you've just come from.
As I said above, this is just standard functionality across the platform, regardless of whether you are using custom tables or not. Full documentation on Related Lists can be seen here.
Callum
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-15-2021 04:28 PM
The "trick" is that the parent reference field must be called "Parent", or the automatic referencing doesn't work.