You need to sign in to do that
Don't have an account?
Pardhu Thottempudi
Using a Standard List Controller, create a Visualforce page which displays a list of Accounts with links to their respective record detail pages.
Using a Standard List Controller, create a Visualforce page which displays a list of Accounts with links to their respective record detail pages.
The page must be named 'AccountList'.
It must reference the Account standard controller.
It must have a recordSetVar equal to 'accounts'.
It must have a Visualforce apex:repeat component.
The repeater must have the var attribute set to 'a'.
The repeater must use the <li> HTML list tag
The repeater must 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>').
The page must be named 'AccountList'.
It must reference the Account standard controller.
It must have a recordSetVar equal to 'accounts'.
It must have a Visualforce apex:repeat component.
The repeater must have the var attribute set to 'a'.
The repeater must use the <li> HTML list tag
The repeater must 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>').
Greetings to you!
Please try the below code, I have tested in my org and it is working fine.
I hope it helps you.
Kindly let me know if it helps you and close your query by marking it as solved so that it can help others in the future. It will help to keep this community clean.
Thanks and Regards,
Khan Anas
All Answers
Greetings to you!
Please try the below code, I have tested in my org and it is working fine.
I hope it helps you.
Kindly let me know if it helps you and close your query by marking it as solved so that it can help others in the future. It will help to keep this community clean.
Thanks and Regards,
Khan Anas
Thank you so much for your efforts to give solution
<apex:page standardController="Account" recordSetVar="accounts">
<apex:pageBlock >
<apex:repeat value="{!accounts}" var="a">
<li>
<apex:outputLink value="{!a.Id}"/>
<apex:outputText value="{!a.id}"/>
<apex:outputLink value="{!a.Name}"/>
<apex:outputText value="{!a.Name}"/>
</li>
</apex:repeat>
</apex:pageBlock>
</apex:page>
why you use "/" before {!a.ID}in below line
<apex:outputLink value="/{!a.ID}">
@Simran Bansal
When I removed that / it showed error "The name can only contain underscores and alphanumeric characters. It must begin with a letter and be unique, and must not include spaces, end with an underscore, or contain two consecutive underscores." when I clicked on link in the output.
when you put "/" account link redirects to account.