+ 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