Advertisement
Guest User

Untitled

a guest
Jun 19th, 2019
114
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.17 KB | None | 0 0
  1. public class accconhierarchy {
  2. Private list<Action_Item__c> acc;
  3.  
  4. public List<accountWrap> accountList { get; set; }
  5. public accconhierarchy (){
  6. List<contactWrap> cw;
  7. accountList = new List<accountWrap>();
  8. acc = [select id,name,Priority__c,Hours_act__c,Due_Date__c,(select id,name,Priority__c,Hours_act__c,Due_Date__c from Related_Action_Items__r) from Action_Item__c limit 500];
  9. for(Action_Item__c a:acc){
  10. cw = new list<contactWrap>();
  11. For(Action_Item__c co : a.Related_Action_Items__r){
  12. cw.add(new contactWrap(co));
  13. }
  14. accountList.add(new accountWrap(a,false,cw));
  15. }
  16. }
  17.  
  18. public class accountWrap{
  19. public Action_Item__c oAccount{get;set;}
  20. public boolean isSelected{get;set;}
  21. public List<contactWrap> contactset{get;set;}
  22. public accountWrap(Action_Item__c a,boolean b, List<contactWrap> c){
  23. oAccount=a;
  24. isSelected=b;
  25. contactset =c;
  26. }
  27. }
  28.  
  29. public class contactWrap{
  30. public Action_Item__c oContact{get;set;}
  31. public boolean isSelected{get;set;}
  32. public contactWrap(Action_Item__c a){
  33. oContact=a;
  34. isSelected=false;
  35. }
  36. }
  37. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement