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
manjunath vivekmanjunath vivek 

I am not able to retrieve the fields from contact.

I am not able to retrieve the fields from contact,can some one help me  on this?

<apex:page standardController="contact" recordSetVar="contact">
<apex:pageBlock title="Viewing Contacts">
<apex:form id="theForm">
<apex:pageBlockSection >
<apex:pageBlockTable value="{!contact}" var="c" id="List">
{!c.name}    
</apex:pageBlockTable>
</apex:pageBlockSection>
</apex:form>
</apex:pageBlock>
</apex:page>
Frédéric TrébuchetFrédéric Trébuchet
Hi,

There is a confusion between "contact" for standardController and recordSetVar.
recordSetVar should be "contacts" then pageBlockTable should refer to "contacts" too.

Hope this helps,
Fred
Frédéric TrébuchetFrédéric Trébuchet
Hi,

If this answer helped you solve your problem, please, mark the question as Solved and kindly select the best answer ;)

Thanks,
Fred