function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
admin adpadmin adp 

How to automatically create a record in child object based on field in parent object

Parent Object

Record 1:

Primary Country (picklist):  Country 1

Secondary Countries (multi-picklist): 

Country 2

Country 3

Country 4

 

Given the above record on the parent object, I want the following records to be automatically created on the child object:

 

Child Object:

Record 1:

Project Country:  Country 1

Primary Country: Yes

Record 2:

Project Country: Country 2

Primary Country: No

Record 3:

Project Country: Country 3

Primary Country: No

Record 4:

Project Country: Country 4

Primary Country: No

Jia HuJia Hu
You can use Trigger to do this.
Make a 'After Insert Trigger' on the Parent Object, when the new record is inserted, based on the input value, create the records on the Child object.