+ Start a Discussion
Veni KorapatyVeni Korapaty 

Can't see the record for Contacts Standard Object using the Visualforce

Can't the see record related to contacts using the below code. Can some one help what is the actual issue with my code

<apex:page standardController="contact" recordSetVar="conList">
   <apex:pageBlock title="Hello {!$User.FirstName}!">
   <apex:pageBlock title="Contacts">
      <apex:pageBlockTable value="{!conList}" var="con">
         <apex:column value="{!con.Name}"/>

If i use the same code, but changing the standard controller name to account/opportunity working fine. Issue is with contact object
Hi Veni,

This code works for me so I would assume its a security issue, Please check if you have object level access on contact and field level access on Name field.

Fahad Akhtar
Arunkumar RArunkumar R
Hi Veni,

     There is no issue in your VF code. As per fahad suggesstion, I would like you to ensure the following settings,

1. If OWD(Sharing setting) private for the contact object, then you can see only the records that you have created.
2. Ensure the object level permission for the contact object at Profile Level. It should be atleast Read option in your case.
Veni KorapatyVeni Korapaty
Thanks. I don't see any security issues with contact. I would like to know do i need to delete any caching ...
Veni KorapatyVeni Korapaty
I am running as a system administer...
Arunkumar RArunkumar R
could you try the below code,
<apex:page standardController="Contact" recordSetVar="contacts">
 <apex:dataList var="a" value="{!contacts}" type="1">
Veni KorapatyVeni Korapaty
I tried, Can't see anything..