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
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:form>
        <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:pageBlockTable>
        </apex:pageBlock>
    </apex:form>
</apex:page>

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