You need to sign in to do that
Don't have an account?
Nima
Insert data in multiple related object from one page
I have two custom objects for example xx__c and yy__c.
yy__c is the detail object and xx__c is the master object.
I would like to create a VF page and insert record to both xx__c and multple yy__c when i click on the save action.
I also want to launch this VF page using a button from Campaign detail page.
Does anyone have any sample code for this?
Thank you
Refer to the below Apex doc link for the sample code to
Create Parent and Child Records in a Single Statement Using Foreign Keys :
http://www.salesforce.com/us/developer/docs/apexcode/index_Left.htm#StartTopic=Content/langCon_apex_dml_foreign_keys.htm?SearchType=Stem
Other considerations:
Thank you Karthikeyan for the reference. I will look into it.