You need to sign in to do that
Don't have an account?
Ashok S 7
how can i use the record id to bind the vf page
Hai guys,
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>').
how can i achieve it.
my vf page code is
<apex:page standardController="Account" recordSetVar="accounts">
<apex:form >
<apex:repeat value="{!accounts}" var="a">
<li> <apex:outputLink value="/apex/AccountList?id=00128000005LpU9">
{!Account.Name}
</apex:outputLink>
</li>
</apex:repeat>
</apex:form>
</apex:page>
can any one help me
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>').
how can i achieve it.
my vf page code is
<apex:page standardController="Account" recordSetVar="accounts">
<apex:form >
<apex:repeat value="{!accounts}" var="a">
<li> <apex:outputLink value="/apex/AccountList?id=00128000005LpU9">
{!Account.Name}
</apex:outputLink>
</li>
</apex:repeat>
</apex:form>
</apex:page>
can any one help me
Thx
All Answers
Please let us know if this will help u
Thanks
Amit Chaudhary
Thx
I am not wrong then your page name should be "AccountList". And we need to redirect to Account record not on the "AccountList" page
See below lin for task detail :-
https://developer.salesforce.com/trailhead/visualforce_fundamentals/visualforce_standard_list_controllers
So your link should be below Not below Please let us know if this will help u
I think the best way to complete this challenge is place li tag under apex:outputLink tag. Otherwise it looks awful.
Try this one...
<apex:repeat value="{!accounts}" var="a">
<apex:outputLink value="/{!a.Id}">
<li>{!a.Name}</li>
</apex:outputLink>
</apex:repeat>
Thanks Kishan and Igor, It worked for me as welll. But what is the use of <Li>?
Regards, Nagesh
@Nagesh,
Its HTML tag..It is used to list the items
<li>Pen</li>
Try this to know more info: http://www.w3schools.com/html/html_lists.asp
Thanks & Regards,
Kishan
<apex:page standardController="Account" recordSetVar="accounts">
<apex:repeat var="a" value="{!accounts}">
<li>
<apex:outputLink value="/{!a.id}" >
{!a.name}
</apex:outputLink>
</li>
</apex:repeat>
</apex:page>
Shauryanaditya Singh -you are right but the concept is very tough
<apex:pageBlock title="Accounts List" id="accounts_list">
<apex:repeat value="{! accounts }" var="a" >
<li>
<apex:outputLink value="{! URLFOR($Action.Account.View, a.Id) }">
{! a.Name}
</apex:outputLink>
</li>
</apex:repeat>
</apex:pageBlock>
</apex:page>
<apex:repeat var="a" value="{!accounts}">
<li>
<apex:outputLink value="/{!a.id}" >
{!a.name}
</apex:outputLink>
</li>
</apex:repeat>
</apex:page>
<apex:page standardController="Account" recordSetVar="accounts">
<apex:pageBlock title="Accounts List" id="accounts_list">
<apex:repeat value="{!accounts}" var="a">
<li>
<apex:outputLink value="/{!a.id}" >
{!a.name}
</apex:outputLink>
</li>
</apex:repeat>
</apex:pageBlock>
</apex:page>
https://playful-goat-385395-dev-ed--c.ap5.visual.force.com/apex/AccountList?core.apexpages.request.devconsole=1&id=0017F00000KotbPQAR
It works properly...
**************************************** Code *******************************************************
<apex:page standardController="Account" recordSetVar="Accounts">
<apex:pageBlock>
<apex:repeat value="{!Account}" var="a" 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>
<apex:page standardController="Account" recordSetVar="accounts">
<ol>
<apex:repeat value="{!accounts}" var="a">
<li>
<apex:outputLink value="/{!a.id}" >
{!a.Name}
</apex:outputLink>
</li>
</apex:repeat>
</ol>
</apex:page>
<apex:page standardController="Account" recordSetVar="accounts">
<apex:pageblock >
<apex:repeat value="{!accounts}" var="a" rendered="true" id="Account_List">
<li>
<apex:outputLink value="/{!a.id}">
<apex:outputText value="{!a.name}"></apex:outputText>
</apex:outputLink>
</li>
</apex:repeat>
</apex:pageblock>
</apex:page>