function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Surya KallakuriSurya Kallakuri 

My task is to make "account name" as hyperlink and when I click on account name... the account details should visible for me.... please help me out... my code is not working...

 
<apex:page standardController="Account" recordsetvar="acc" extensions="paginationcls2">
<apex:form >
<apex:pageBlock >
<apex:pageblockTable value="{!acc}" var="a">
<apex:column value="{!a.name}"/> 
<apex:outputLink value="/{$acc.name}">{$acc.name}</apex:outputLink>
</apex:pageblockTable>
<apex:tabPanel switchType="client">
<apex:commandButton value="previous" action="{!previous}"/>
<apex:commandButton value="Next" action="{!next}"/>
</apex:tabPanel>
</apex:pageBlock>
</apex:form>  
</apex:page>
Best Answer chosen by Surya Kallakuri
Amit Chaudhary 8Amit Chaudhary 8
Update your code like below
<apex:page standardController="Account" recordsetvar="acc" >
<apex:form >
<apex:pageBlock >
<apex:pageblockTable value="{!acc}" var="a">
<apex:column> <apex:outputLink value="/{!a.id}">{!a.name}</apex:outputLink>
</apex:column>
</apex:pageblockTable>
<apex:tabPanel switchType="client">
<apex:commandButton value="previous" action="{!previous}"/>
<apex:commandButton value="Next" action="{!next}"/>
</apex:tabPanel>
</apex:pageBlock>
</apex:form>  
</apex:page>

Let us know if this will help you


 

All Answers

Amit Chaudhary 8Amit Chaudhary 8
Update your code like below
<apex:page standardController="Account" recordsetvar="acc" >
<apex:form >
<apex:pageBlock >
<apex:pageblockTable value="{!acc}" var="a">
<apex:column> <apex:outputLink value="/{!a.id}">{!a.name}</apex:outputLink>
</apex:column>
</apex:pageblockTable>
<apex:tabPanel switchType="client">
<apex:commandButton value="previous" action="{!previous}"/>
<apex:commandButton value="Next" action="{!next}"/>
</apex:tabPanel>
</apex:pageBlock>
</apex:form>  
</apex:page>

Let us know if this will help you


 
This was selected as the best answer
Surya KallakuriSurya Kallakuri
Thanks for ur help.. It's working