Skip to main content
edited tags
Link
Chris Duncombe
  • 24.3k
  • 13
  • 77
  • 116
added 130 characters in body; edited tags; edited title
Source Link
Chris Duncombe
  • 24.3k
  • 13
  • 77
  • 116

what is wrong in my code .....the error is like " Error: Unknown property 'OpportunityStandardController.opp' "

I have a controller extension and I get the unknown property error on page load.

public with sharing class ExtensionController{  
       public ApexPages.StandardController standardCon;    
       public ExtensionController(ApexPages.StandardController con){  
          standardCon = con;  
       }    
       public void populateRelAccFields(){  
          Opportunity opp = (Opportunity) standardCon.getRecord();  
          opp.Account = [select Phone, Type from Account where id =: opp.AccountId];  
       } 
    } 

what is wrong in my code .....the error is like " Error: Unknown property 'OpportunityStandardController.opp' "

public with sharing class ExtensionController{  
   public ApexPages.StandardController standardCon;    
   public ExtensionController(ApexPages.StandardController con){  
      standardCon = con;  
   }    
   public void populateRelAccFields(){  
      Opportunity opp = (Opportunity) standardCon.getRecord();  
      opp.Account = [select Phone, Type from Account where id =: opp.AccountId];  
   } 
} 

Error: Unknown property 'OpportunityStandardController.opp'

I have a controller extension and I get the unknown property error on page load.

public with sharing class ExtensionController{  
       public ApexPages.StandardController standardCon;    
       public ExtensionController(ApexPages.StandardController con){  
          standardCon = con;  
       }    
       public void populateRelAccFields(){  
          Opportunity opp = (Opportunity) standardCon.getRecord();  
          opp.Account = [select Phone, Type from Account where id =: opp.AccountId];  
       } 
    } 

public with sharing class ExtensionController{
public ApexPages.StandardController standardCon;
public ExtensionController(ApexPages.StandardController con){
standardCon = con;
}
public void populateRelAccFields(){
Opportunity opp = (Opportunity) standardCon.getRecord();
opp.Account = [select Phone, Type from Account where id =: opp.AccountId];
} }

public with sharing class ExtensionController{  
   public ApexPages.StandardController standardCon;    
   public ExtensionController(ApexPages.StandardController con){  
      standardCon = con;  
   }    
   public void populateRelAccFields(){  
      Opportunity opp = (Opportunity) standardCon.getRecord();  
      opp.Account = [select Phone, Type from Account where id =: opp.AccountId];  
   } 
} 

public with sharing class ExtensionController{
public ApexPages.StandardController standardCon;
public ExtensionController(ApexPages.StandardController con){
standardCon = con;
}
public void populateRelAccFields(){
Opportunity opp = (Opportunity) standardCon.getRecord();
opp.Account = [select Phone, Type from Account where id =: opp.AccountId];
} }

public with sharing class ExtensionController{  
   public ApexPages.StandardController standardCon;    
   public ExtensionController(ApexPages.StandardController con){  
      standardCon = con;  
   }    
   public void populateRelAccFields(){  
      Opportunity opp = (Opportunity) standardCon.getRecord();  
      opp.Account = [select Phone, Type from Account where id =: opp.AccountId];  
   } 
} 
Source Link
Loading