+ Start a Discussion

standard controller extension

hey everyone, m new to apex.i dont knw why but m  getting this error:  Incompatible types since an instance of SObject is never an instance of opportunity. plz help.... 




here is a bit of my code:

public with sharing  class opportunityExtensions { 

public opportunity opp;

   public opportunityExtensions(ApexPages.StandardController controller)     {     




Rahul SharmaRahul Sharma

Can you post your page


Post your VF code, but, before you do, check that you have:


<apex:page standardController="Opportunity" extensions="opportunityExtensions">



and you don't have RecordSetVar in there.


Best, Steve.