+ Start a Discussion
siliveru venkateshsiliveru venkatesh 

Invalid type: Schema.oppotunity

Hi..... All
I am trying to fetch the data from Opportunity and display in vf page,But i am facing this Error any one can help me.
[(apex Error) Invalid type: Schema.oppotunity     (VF page Error) Unknown property 'SOQL_Ex2.lopty']
VF Code:
<apex:page controller ="SOQL_Ex2">
        <apex:pageBlock  title ="SPQL_Ex2">
            <apex:pageBlockTable value="{!lopty}" var="op">
                <apex:column value="{!op.name}"/>
                <apex:column value="{!op.stagename}"/>
                <apex:column value="{!op.closedate}"/>


Apex Class:
public class SOQL_Ex2 
    public list<Opportunity> lopty {get;set;}
    public SOQL_Ex2()
        lopty=[select Name,StageName,CloseDate from oppotunity];
Bhanu joshi 10Bhanu joshi 10
Replace "oppotunity" with "Opportunity" at last line in apex .You have written wrong spelling of opportunity