Advertisement
Guest User

Untitled

a guest
Mar 28th, 2017
45
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.16 KB | None | 0 0
  1. //controller to create parent child records record
  2. public class mainClass{
  3.  
  4. List<Account> lstAccount{get;set;}
  5. List<FirstChild__c> lstfirstChild{get;set;}
  6. List<SecondChild__c> lstSecondChild{get;set;}
  7. List<ThirdChild__c> lstThirdChild{get;set;}
  8.  
  9. public void createparent(){
  10. parentcontroller parent=new parentcontroller();
  11. lstAccount=parent.createParentRecords(); //this method will call the parentcontroller and there itself it will create parent record and return the created parent records
  12. }
  13.  
  14. public void createFirstChil(){
  15. firstChildcontroller first=new firstChildcontroller();
  16. lstfirstChild=first.createFirstChildRecord(lstAccount); // This method will create first child records
  17. }
  18.  
  19. public void createFirstChil(){
  20. secondChildcontroller first=new secondChildcontroller();
  21. lstSecondChild=first.createSecondChildRecord(lstAccount);// This method will create first child records
  22. }
  23. public void createFirstChil(){
  24. thirdchildcontroller first=new thirdchildcontroller();
  25. lstThirdChild=first.createThirdChildRecord(lstAccount);// This method will create first child records
  26. }
  27.  
  28. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement