You need to sign in to do that
Don't have an account?

The page does not bind to the record ID value (in order to link to the record detail page) in VisualForce trailhead challenge
Hi,
Eventhough my code works i still get the error "The page does not bind to the record ID value (in order to link to the record detail page) " when i tried to check in the challenge. any help is appreciated.
code below:
<apex:page standardController="Account" recordSetVar="accounts" >
<apex:pageBlock title="Account List">
<!-- accounts List -->
<apex:repeat value="{! accounts }" var="a">
<li>
<apex:outputLink value="/{!LEFT(a.Id,15)}">/{!LEFT(a.Id,15)} </apex:outputLink>
</li>
</apex:repeat>
</apex:pageBlock>
</apex:page>
Thanks
Eventhough my code works i still get the error "The page does not bind to the record ID value (in order to link to the record detail page) " when i tried to check in the challenge. any help is appreciated.
code below:
<apex:page standardController="Account" recordSetVar="accounts" >
<apex:pageBlock title="Account List">
<!-- accounts List -->
<apex:repeat value="{! accounts }" var="a">
<li>
<apex:outputLink value="/{!LEFT(a.Id,15)}">/{!LEFT(a.Id,15)} </apex:outputLink>
</li>
</apex:repeat>
</apex:pageBlock>
</apex:page>
Thanks
Any input for the above code so as not to get the error "The page does not bind to the record ID value (in order to link to the record detail page) in VisualForce trailhead challenge" while check in the challenege?
Thanks.
<apex:page standardController="Account" recordSetVar="accounts">
<apex:pageBlock title="Account Links">
<apex:repeat var="a" value="{!accounts}" rendered="true" id="account_list">
<li>
<apex:outputLink value="https://ap1.salesforce.com/{!a.ID}" >
{! a.name}
</apex:outputLink>
</li>
</apex:repeat>
</apex:pageBlock>
</apex:page>
This code gets me a nice little list of the accounts in my dev org and I can click on any one of them and get to the detail record, so I'm certain I'm getting the result I'm supposed to get. But I'm still getting the error. I don't see what my code and Chithra's code has in common that might be causing an error. Does anyone have an idea about what Trailhead might think is wrong? Has anyone else passed this challenge successfully who might be willing to share his/her code?
Thanks much--
Jeanne
<apex:repeat value="{! accounts}" var="a">
<li>
<apex:outputLink value="/{! a.ID }">
Click here {!a.ID}
</apex:outputLink>
</li>
</apex:repeat>
</apex:page>
This works. Looks like salesforce doesnt want you to append the full URL to the outputlink value. @SalesForce, can you update this? Thanks!
The above code of yours work fine. I tried like that before and it didn't work at that time.Thanks, Chithra
Just a heads-up...
Don't use an expression for the URL value. In Lightning, you MUST use expressions to output a value, e.g.:
In VF, you CAN use an express...but don't. The challenge will not pass if you do. Do this instead:
.
<apex:page standardController="Account" recordSetVar="accounts">
<apex:pageBlock title="Account Links">
<apex:repeat var="a" value="{!accounts}" rendered="true" id="account_list">
<li>
<apex:outputLink value="/{! a.ID }" >
{! a.name}
</apex:outputLink>
</li>
</apex:repeat>
</apex:pageBlock>
</apex:page>
gracias a todos, por sus aportes