Activity Forums Salesforce® Discussions How to show my account list on apex page at the time when we preview the page in Salesforce? Reply To: How to show my account list on apex page at the time when we preview the page in Salesforce?

  • Neha

    Member
    August 17, 2017 at 9:47 am

    Hi Shariq,

    You can use recordSetVar to view the list and create a variable "var" in <apex:repeat> tag to acess the records. May this example helps you:

    <apex:page standardController="Account" recordSetVar="Accounts" >
    <apex:pageblock>
    <apex:repeat var="a" value="{!Accounts}" rendered="true" id="account_list">
    <li>
    <apex:outputLink value="/{!a.ID}" >
    <apex:outputText value="{!a.Name}"/>
    </apex:outputLink>
    </li>
    </apex:repeat>
    </apex:pageblock>
    </apex:page>