You need to sign in to do that
Don't have an account?
eriktown
Need help displaying a user's contacts
Hello folks. I'm doing something which I thought was fairly straightforward, but maybe not. :)
I'm trying to create a custom page which will display the current user's contacts and allow the user to click on a button to perform an operation on that user. However, I've ran into trouble rather early on - I can't get the contact list to display at all!
I'm working from the example here:
And here is my code:
<apex:page standardController="Contact" recordSetVar="contacts" tabStyle="Contact"> <apex:form > <apex:pageBlock title="Purchase" mode="edit"> <apex:pageMessages /> <apex:pageBlockTable value="{!selected}" var="contact"> <apex:column value="{!contact.Name}"/> <apex:column headerValue="Email"> <apex:inputField value="{!contact.email}"/> </apex:column> <apex:column headerValue="Purchase"> <apex:commandButton value="Purchase"/> </apex:column> </apex:pageBlockTable> </apex:pageBlock> </apex:form> </apex:page>
Does anyone know what I am doing wrong?
Thanks!
I assume you meant to iterate over contacts, instead. Here's my revision:
The bit in red text is my contribution to your problem.
All Answers
I assume you meant to iterate over contacts, instead. Here's my revision:
The bit in red text is my contribution to your problem.
You're exactly right. How did I miss that!