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
BetsyBetsy 

Automatically Add Related List Items

Hi,
 
I am not a developer but I am wondering how difficult it would be to have related list items automatically added upon creation of the master object.
 
For instance, I have two custom objects Master and Detail.  Detail has automatic number assigned to it and a picklist with 4 values.  When the Master object is created, I would like to create four detail objects - one for each of the picklist values.
 
Is this possible?  If so, how complicated is it?
 
TIA
Benjamin_PirihBenjamin_Pirih
Sounds like you want a trigger on the master object on create..
 
During the execution of this trigger you would like to create objects for each item in the master picklist.
 
on custom object creation
(
   for each ( item in (select item list from created object))
    (
      create child custom object with picklist value
    )
)
 
It is possible, it is not that complicated, if you understand apex and triggers.  Difficult is a relative question..