+ Start a Discussion
rahul soni 20rahul soni 20 

error in vf page compilation?can anyone help

Error:::   <apex:page> is required and must be the outermost tag in the markup at line 1 column 1

 

<apex:page standardController="Opportunity">
    
    <apex:outputField value="{!Opportunity.Name}"/><br/>
    <apex:outputField value="{!Opportunity.Amount}"/><br/>
    <apex:outputField value="{!Opportunity.CloseDate}"/><br/>
    <apex:outputField value="{!Opportunity.Account.Name}"/>
    
</apex:page>

SwethaSwetha (Salesforce Developers) 
HI Rahul,
Do you have any other code before <apex:page> ? If so, it needs to be removed. Ideally executing the above snippet does not give any error message.
 
Hope this helps you. Please mark this answer as best so that others facing the same issue will find this information useful. Thank you