You need to sign in to do that
Don't have an account?
Anshuta Awasthi 7
Getting error on "Using Standard Controller List" challenge in trailhead module named "Visualforce Basics"
Here is my code for a challenge .
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)
<apex:page standardController="Account" recordsetVar="accounts"> <apex:pageBlock title="Account List"> <apex:repeat value="{!accounts}" var="a"> <li> <apex:outputLink value="https://ap2.salesforce.com/{!a.ID}"> {!a.ID} </apex:outputLink> </li> </apex:repeat> </apex:pageBlock> </apex:page>I am getting perfect output but when i click on check challenge button. I get the below error in trailhead:
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)
Try this below Code
<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>
Let me Know is that Helpful to you
Thanks
RAJ.
(Sweet Potato Tec)
https://developer.salesforce.com/forums/ForumsMain?id=906F0000000BROJIA4
your code should be like below
You should not specify https://ap2.salesforce.com, just using right slash / inside the value tag will work.
The code should be like this (including pageblock):
Thanks,
Puneet