Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //controller to create parent child records record
- public class mainClass{
- List<Account> lstAccount{get;set;}
- List<FirstChild__c> lstfirstChild{get;set;}
- List<SecondChild__c> lstSecondChild{get;set;}
- List<ThirdChild__c> lstThirdChild{get;set;}
- public void createparent(){
- parentcontroller parent=new parentcontroller();
- lstAccount=parent.createParentRecords(); //this method will call the parentcontroller and there itself it will create parent record and return the created parent records
- }
- public void createFirstChil(){
- firstChildcontroller first=new firstChildcontroller();
- lstfirstChild=first.createFirstChildRecord(lstAccount); // This method will create first child records
- }
- public void createFirstChil(){
- secondChildcontroller first=new secondChildcontroller();
- lstSecondChild=first.createSecondChildRecord(lstAccount);// This method will create first child records
- }
- public void createFirstChil(){
- thirdchildcontroller first=new thirdchildcontroller();
- lstThirdChild=first.createThirdChildRecord(lstAccount);// This method will create first child records
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement