+ Start a Discussion
dlCamelotdlCamelot 

Admin can't see any accounts on basic page

Made a basic VF page for accounts that compiles with no errors.  However, the page columns render blank and don't show any records.  Is there something I need to adjust in the view permissions?  

Note: I'm trying to view the account page from the admin user who is also the owner of all accounts.
<apex:page showHeader="true" sidebar="true" standardStylesheets="true" docType="html-5.0" standardController="Account" recordSetVar="accounts">

<apex:pageBlock>
	<apex:pageBlockTable value="{!accounts}" var="a">
		<apex:column value="{!a.Name}" />
		<apex:column value="{!a.ShippingStreet}<{!a.ShippingCity}{!a.ShippingState}{!a.ShippingPostalCode}" />
	</apex:pageBlockTable>
</apex:pageBlock>

</apex:page>


Page Code:
<apex:page showHeader="true" sidebar="true" standardStylesheets="true" docType="html-5.0" standardController="Account" recordSetVar="accounts">

<apex:pageBlock>
    <apex:pageBlockTable value="{!accounts}" var="a">
        <apex:column value="{!a.Name}" />
        <apex:column value="{!a.ShippingStreet}<{!a.ShippingCity}{!a.ShippingState}{!a.ShippingPostalCode}" />
    </apex:pageBlockTable>
</apex:pageBlock>

</apex:page>
Best Answer chosen by dlCamelot
Mudasir WaniMudasir Wani
Hey DLloyd,

There is nothing wrong in code you need to modify the URL.
Make sure you are passing the Id in the URL.
yoursalesforceinstance/apex/pagename?id=accountId
here is a sample URL
https://eu5.salesforce.com/apex/displayAccounts?id=00124000007rMs8

Donot forget to select best answer to make our efforts visible in the developer forum.
Please mark this as solution by selecting it as best answer if this solves your problem, So that if anyone has this issue this post can help

All Answers

Divyansh07Divyansh07
Hi DLloyd,

Is it displaying a blank table? As I tried the same thing it was working fine for me. 
dlCamelotdlCamelot
It is.  See the screenshot below:

User-added image
dlCamelotdlCamelot
Ok, I've got new records appearing, but any account records made prior to the VF page don't show.  Why is that?
Mudasir WaniMudasir Wani
Hey DLloyd,

There is nothing wrong in code you need to modify the URL.
Make sure you are passing the Id in the URL.
yoursalesforceinstance/apex/pagename?id=accountId
here is a sample URL
https://eu5.salesforce.com/apex/displayAccounts?id=00124000007rMs8

Donot forget to select best answer to make our efforts visible in the developer forum.
Please mark this as solution by selecting it as best answer if this solves your problem, So that if anyone has this issue this post can help
This was selected as the best answer
dlCamelotdlCamelot
And how would I be able to set the URL for a VF page?
Mudasir WaniMudasir Wani
Where are you using this page.
How you call this.
dlCamelotdlCamelot
I call it by a custom tab.  Here's the URL that was given when the tab was created: https://c.na24.visual.force.com/apex/<VFpageName>?sfdc.tabName=<TabID#>/
Mudasir WaniMudasir Wani
Hey DLloyd,

Your code should work 
Refer to the below link.
They are saying call the page by using the following URL:
https://*salesforce_instance*/apex/multOppEdit

http://developer.force.com/cookbook/recipe/editing-multiple-records-using-a-visualforce-list-controller%EF%BB%BF

Donot forget to select best answer to make our efforts visible in the developer forum.
Please mark this as solution by selecting it as best answer if this solves your problem, So that if anyone has this issue this post can help
 
dlCamelotdlCamelot
Nope.  Still only shows records created AFTER the page was constructed.  None of the records from before.