• vasuroy
  • NEWBIE
  • 25 Points
  • Member since 2013

  • Chatter
    Feed
  • 1
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 3
    Questions
  • 7
    Replies

 

 

i have one doubt    custom controller have many methods if u want custome business logic  we can define extra method  in custom controller

why are useing the extensions, when  we use  extentions in  custom controller  please let me know  help me.....

Hi , i need to calculate the toal amount for closed/won opportunity amount for a particular user and display it in a field of custom object , where the custom object has look up relationship to the user, can any one help me how to do that

 can anyone modify  the below code , i want to use extions  with standard controller  account ,
thx
 
 
 
 
 
public class accconhierarchy {
    Private list<account> acc;
    
    public List<accountWrap> accountList { get; set; }
    public accconhierarchy (){
        List<contactWrap> cw;
        accountList = new List<accountWrap>();
        acc = [select id,name,industry,billingcountry,createdbyid,(select id,name,email,phone from contacts) from account limit 20];
        for(account a:acc){
            cw = new list<contactWrap>();
            For(contact co : a.contacts){
               cw.add(new contactWrap(co));
            }
            accountList.add(new accountWrap(a,false,cw));
        }
    }
    
    public class accountWrap{
        public account oAccount{get;set;}
        public boolean isSelected{get;set;}
        public List<contactWrap> contactset{get;set;}
        public accountWrap(account a,boolean b, List<contactWrap> c){
            oAccount=a;
            isSelected=b;
            contactset =c;            
        }
    }
    
    public class contactWrap{
        public contact oContact{get;set;}
        public boolean isSelected{get;set;}        
        public contactWrap(contact a){
            oContact=a;
            isSelected=false;                       
        }
    }
    
}
 

how do we add vf page with custom controllers  as a buttons  or link in  a detail pagelayout ,

 

 

 

i have one doubt    custom controller have many methods if u want custome business logic  we can define extra method  in custom controller

why are useing the extensions, when  we use  extentions in  custom controller  please let me know  help me.....

what is the best real time scnerio for before insert  and before update  for interview purpose ?

 

can u say ?

 

thank u .

Hi , i need to calculate the toal amount for closed/won opportunity amount for a particular user and display it in a field of custom object , where the custom object has look up relationship to the user, can any one help me how to do that

 can anyone modify  the below code , i want to use extions  with standard controller  account ,
thx
 
 
 
 
 
public class accconhierarchy {
    Private list<account> acc;
    
    public List<accountWrap> accountList { get; set; }
    public accconhierarchy (){
        List<contactWrap> cw;
        accountList = new List<accountWrap>();
        acc = [select id,name,industry,billingcountry,createdbyid,(select id,name,email,phone from contacts) from account limit 20];
        for(account a:acc){
            cw = new list<contactWrap>();
            For(contact co : a.contacts){
               cw.add(new contactWrap(co));
            }
            accountList.add(new accountWrap(a,false,cw));
        }
    }
    
    public class accountWrap{
        public account oAccount{get;set;}
        public boolean isSelected{get;set;}
        public List<contactWrap> contactset{get;set;}
        public accountWrap(account a,boolean b, List<contactWrap> c){
            oAccount=a;
            isSelected=b;
            contactset =c;            
        }
    }
    
    public class contactWrap{
        public contact oContact{get;set;}
        public boolean isSelected{get;set;}        
        public contactWrap(contact a){
            oContact=a;
            isSelected=false;                       
        }
    }
    
}
 

how do we add vf page with custom controllers  as a buttons  or link in  a detail pagelayout ,