The page does not bind to the record ID value (in order to link to the record detail page)








Trailmix ==>

Visualforce Basics >> Use Standard List Controllers


Challenge ==>

Create a Visualforce page which shows a list of Accounts linked to their record pages
Using a Standard List Controller, create a Visualforce page which displays a list of Accounts with links to their respective record detail pages.


Challenge Requirements

  • The page must be named AccountList
  • It must reference the Account standard controller
  • It must have a recordSetVar attribute equal to accounts
  • It must have a Visualforce apex:repeat component, with the following:
    • Use the var attribute set to a
    • Use the <li> HTML list tag
    • Use the apex:outputLink component to link to the respective record detail page
  • HINT: Record detail pages can be reached by placing a record ID at the root of the URL (e.g. <record id>)


Error ==>

The page does not bind to the record ID value (in order to link to the record detail page)


Code ==>


<apex:page standardController="Account" recordSetVar="accounts">
    <apex:repeat value="{! accounts}" var="a">
        <li>        
            <apex:outputLink value="/{! a.ID }">
                {!a.ID} <br/>
            </apex:outputLink>
        </li>
    </apex:repeat>   
</apex:page>



Hope this helps you...Enjoy..!



Comments

Popular posts from this blog

Salesforce Integration with Foreign Exchange Rates API for Currency Conversion

Administrator Certification Maintenance (Spring '21) Questions

Salesforce App Builder - Question Set 3