You need to sign in to do that
Don't have an account?
Val Southern72
Trailhead challenge says 'challenge incomplete' when my VF page fulfills all the criteria
I'm on the 'Using Standard List Controllers ' module in the VisualForce Basics trail and I have completed the challenge and my VF page works.
Here is the challenge:
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>').
Here is my page content:
<apex:page standardController="Account" recordSetVar="accounts">
<apex:pageBlock >
<apex:repeat var="a" value="{!accounts}">
<li>
<apex:outputLink id="DetailLink" value="https://eu5.salesforce.com/{!a.Id}">
<apex:outputField value="{!a.Name}"/>
</apex:outputLink>
</li>
</apex:repeat>
</apex:pageBlock>
</apex:page>
When I hit the 'Check Challenge' button, a message displays this:
Challenge Not yet complete... here's what's wrong:
The page does not bind to the record ID value (in order to link to the record detail page)
It is not clear what is wrong. Can this be clarified please?
Here is the challenge:
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>').
Here is my page content:
<apex:page standardController="Account" recordSetVar="accounts">
<apex:pageBlock >
<apex:repeat var="a" value="{!accounts}">
<li>
<apex:outputLink id="DetailLink" value="https://eu5.salesforce.com/{!a.Id}">
<apex:outputField value="{!a.Name}"/>
</apex:outputLink>
</li>
</apex:repeat>
</apex:pageBlock>
</apex:page>
When I hit the 'Check Challenge' button, a message displays this:
Challenge Not yet complete... here's what's wrong:
The page does not bind to the record ID value (in order to link to the record detail page)
It is not clear what is wrong. Can this be clarified please?
This post should help point you in the right direction:
https://developer.salesforce.com/forums/?id=906F0000000BWrYIAW
All Answers
This post should help point you in the right direction:
https://developer.salesforce.com/forums/?id=906F0000000BWrYIAW
Changed the page code to this:
<apex:page standardController="Account" recordSetVar="accounts">
<apex:pageBlock >
<apex:repeat var="a" value="{!accounts}">
<li>
<apex:outputLink value="/{!a.id}">{!a.Name}</apex:outputLink>
</li>
</apex:repeat>
</apex:pageBlock>
</apex:page>