Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class accconhierarchy {
- Private list<Action_Item__c> acc;
- public List<accountWrap> accountList { get; set; }
- public accconhierarchy (){
- List<contactWrap> cw;
- accountList = new List<accountWrap>();
- 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];
- for(Action_Item__c a:acc){
- cw = new list<contactWrap>();
- For(Action_Item__c co : a.Related_Action_Items__r){
- cw.add(new contactWrap(co));
- }
- accountList.add(new accountWrap(a,false,cw));
- }
- }
- public class accountWrap{
- public Action_Item__c oAccount{get;set;}
- public boolean isSelected{get;set;}
- public List<contactWrap> contactset{get;set;}
- public accountWrap(Action_Item__c a,boolean b, List<contactWrap> c){
- oAccount=a;
- isSelected=b;
- contactset =c;
- }
- }
- public class contactWrap{
- public Action_Item__c oContact{get;set;}
- public boolean isSelected{get;set;}
- public contactWrap(Action_Item__c a){
- oContact=a;
- isSelected=false;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement