function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ 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.