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
ragati shirisha 4ragati shirisha 4 

syntax error.extra name in line 0 i have checked so many times but still cant able to fix this issue

<apex:page showheader="false" sidebar="false" standardController="Account" >
    <apex:pageBlock title="account information">
        <apex:pageBlockSection title="general account detail">
            <apex:outputField  value="{!Account.name}"/>
            <apex:outputField  value="{!Account.fax}"/>
            <apex:outputField  value="{!Account.phone}"/>
        </apex:pageBlockSection>
        <apex:pageBlockSection title="related accounts">
            <apex:relatedList list="contacts"/>
            <apex:relatedList list="opportunities"/>
        </apex:pageBlockSection>
       </apex:pageBlock>
    <apex:pageBlock title="custom table">
        <apex:pageBlockTable value="{!Account.contacts}" var="AC">
          <apex:column headervalue="contact first name" value="{!AC.first name}"/>
            <apex:column headervalue="contact last name" value="{!AC.last name}"/>
            <apex:column  headervalue="contact email" value="{!AC.contact email}"/>
        </apex:pageBlockTable>
    </apex:pageBlock>
  </apex:page>
Maharajan CMaharajan C
Hi Shirisha,

The contact field API Names you refered wrongly in visualforce page so you are getting this error.
 
<apex:pageBlockTable value="{!Account.contacts}" var="AC">
            <apex:column headervalue="contact first name" value="{!AC.firstname}"/>
            <apex:column headervalue="contact last name" value="{!AC.lastname}"/>
            <apex:column  headervalue="contact email" value="{!AC.Email}"/>
 </apex:pageBlockTable>

Please try the below code:
<apex:page showheader="false" sidebar="false" standardController="Account" >
    <apex:pageBlock title="account information">
        <apex:pageBlockSection title="general account detail">
            <apex:outputField  value="{!Account.name}"/>
            <apex:outputField  value="{!Account.fax}"/>
            <apex:outputField  value="{!Account.phone}"/>
        </apex:pageBlockSection>
        <apex:pageBlockSection title="related accounts">
            <apex:relatedList list="contacts"/>
            <apex:relatedList list="opportunities"/>
        </apex:pageBlockSection>
    </apex:pageBlock>
    <apex:pageBlock title="custom table">
        <apex:pageBlockTable value="{!Account.contacts}" var="AC">
            <apex:column headervalue="contact first name" value="{!AC.firstname}"/>
            <apex:column headervalue="contact last name" value="{!AC.lastname}"/>
            <apex:column  headervalue="contact email" value="{!AC.Email}"/>
        </apex:pageBlockTable>
    </apex:pageBlock>
</apex:page>

Thanks,
Maharajan.C
ravi soniravi soni
hy,
try below.
<apex:page showheader="false" sidebar="false" standardController="Account" >
    <apex:pageBlock title="account information">
        <apex:pageBlockSection title="general account detail">
            <apex:outputField  value="{!Account.name}"/>
            <apex:outputField  value="{!Account.fax}"/>
            <apex:outputField  value="{!Account.phone}"/>
        </apex:pageBlockSection>
        <apex:pageBlockSection title="related accounts">
            <apex:relatedList list="contacts"/>
            <apex:relatedList list="opportunities"/>
        </apex:pageBlockSection>
       </apex:pageBlock>
    <apex:pageBlock title="custom table">
        <apex:pageBlockTable value="{!Account.contacts}" var="AC">
          <apex:column headervalue="contact first name" value="{!AC.firstname}"/>
            <apex:column headervalue="contact last name" value="{!AC.lastname}"/>
            <apex:column  headervalue="contact email" value="{!AC.email}"/>
        </apex:pageBlockTable>
    </apex:pageBlock>
  </apex:page>
your error was in below part.
 <apex:pageBlock title="custom table">
        <apex:pageBlockTable value="{!Account.contacts}" var="AC">
          <apex:column headervalue="contact first name" value="{!AC.first name}"/>
            <apex:column headervalue="contact last name" value="{!AC.last name}"/>
            <apex:column  headervalue="contact email" value="{!AC.contact email}"/>
        </apex:pageBlockTable>
    </apex:pageBlock>
your had left spance among firstname and LastName and email.

let me know if above info is helpfull to you and mark it as best answer.
Thank you