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
subramanyam Rsubramanyam R 

unable to accessing the name and phone number from account object...

<apex:page standardController="account" recordSetVar="accounts">
<apex:form >
<apex:sectionHeader title="account"/>
<apex:pageBlock title="account names">
<apex:pageBlockTable value="{!account}" var="a">
<apex:column value="{!a.name}"/>
<apex:column value="{!a.phone}"/>
</apex:pageBlockTable>
</apex:pageBlock>
</apex:form>
</apex:page>
Best Answer chosen by subramanyam R
subramanyam Rsubramanyam R
yes got it ..thanku 

All Answers

surasura

try below code  <apex:pageBlockTable value="{!account}" var="a"> should be correct as <apex:pageBlockTable value="{!accounts}" var="a">

 
<apex:page standardController="account" recordSetVar="accounts">
<apex:form >
<apex:sectionHeader title="account"/>
<apex:pageBlock title="account names">
<apex:pageBlockTable value="{!accounts}" var="a">
<apex:column value="{!a.name}"/>
<apex:column value="{!a.phone}"/>
</apex:pageBlockTable>
</apex:pageBlock>
</apex:form>
</apex:page>

 
subramanyam Rsubramanyam R
yes got it ..thanku 
This was selected as the best answer