+ Start a Discussion
ethan huntethan hunt 

On Click on Grid View



I have created a list view with column as Account Name . I want when i will click on any name it should ger redirect to that particular account details.


Please help.

Below is my VF code


<apex:page standardController="Account" recordSetVar="accounts" tabStyle="Opportunity" sidebar="false">
<apex:form >
<apex:pageBlock >
<apex:commandButton value="Edit" action="{!edit}"/>
<apex:pageMessages />
<apex:pageBlockButtons >
<apex:commandButton value="Save" action="{!save}"/>
<apex:pageBlockTable value="{!accounts}" var="a">
<apex:column value="{!a.name}"/>
<apex:column headerValue="Type">
<apex:inputField value="{!a.type}"/>
<apex:column headerValue="Account Site">
<apex:inputField value="{!a.site}"/>



you need to use apex:outputLink with account Ia as a value,so replace the below line:

<apex:column value="{!a.name}"/>




<apex:column headerValue="Name">
<apex:outputLink value="/{!a.Id}" target="_blank">{!a.Name}</apex:outputLink>


If this Post heps you then please give KUDOS(click on star at left ) and mark it as solution

ethan huntethan hunt



Thanks for the solution. Is there any other way without link?