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
VPrakashVPrakash 

How to insert a Child record into multiple parent records from the UI

Hi all,

 

How to insert a Child record (e.g., Child__c) into multiple parent records ( e.g., Parent__c) from the UI?

 

Can we implement this using Apex and Visualforce? If so Can you please provide me with the start point 

 

 

Thanks in advance 

 

VPrakash

sfdcfoxsfdcfox

Use multiple Lookup fields if you want to relate a single record to many parents at once, or consider a junction ("many-to-many") object to facilitate linking a single child to many parents (and the other way around, too). Each lookup field can hold only one ID value at once, so you'll need to use either of these two techniques to link a single record to multiple other records.