Create parent child relationship automatically on related list
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-30-2017 03:15 PM
I have two tables I have created. One as the parent and one as the child. When I click "New" on the related list of the child table, I want the parent record # to default into the child record that is created, similar to parent and child incidents. How can I do this?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-30-2017 04:33 PM
all you need to do is create a reference field on a child(B) table pointing to parent (A) table. Once field is created go to parent table and configure > related lists
and add the related list B -> A
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-02-2017 07:36 PM
There is built in functionality for Many To Many tables which automatically create related lists that should do what you want.
To access it, open sys_m2m.list from your navigator, and create your relationship table from there.
You can find more information on sys_m2m here:
Create a many-to-many relationship
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-03-2017 01:03 AM
Hi,
You can simply define a Reference field on the Child table say as "Parent" which is referring to the Parent Table on which you want this child Table to be added as a Related List.
1) For example, i have created a Custom table named as "Child Table" in which I have a created a field called Parent which is Referring to the Parent Table "ACL Testing" as shown below:
Note: Make sure that your Parent Table is extensible then only you would be able to select it while creating the field on the Child Table. If your parent table is not extensible then you need to Navigate to your Parent Table form and mark the "Extensible" checkbox as true as shown below:
For me "ACL Testing" is the name of the Parent Table shown in above screen shot.
2) Once the field has been Created you can Navigate to your Parent Table Form and add the above Table as your Related List as shown below:
3) Once the Related List has been Added you can click on the New button on your Child Table, and check for your parent Field which will contain the parent Number as required for you as shown below:
Hope this helps.Mark the answer as correct/helpful based on impact.
Regards,
Shloke
Regards,
Shloke