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
ethan huntethan hunt 

On Click on Grid View

Hi,

 

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:pageBlockButtons>
<apex:pageBlockTable value="{!accounts}" var="a">
<apex:column value="{!a.name}"/>
<apex:column headerValue="Type">
<apex:inputField value="{!a.type}"/>
</apex:column>
<apex:column headerValue="Account Site">
<apex:inputField value="{!a.site}"/>
</apex:column>
</apex:pageBlockTable>
</apex:pageBlock>
</apex:form>
</apex:page>

Puja_mfsiPuja_mfsi

HI,

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

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

 

with

 

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

 

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

ethan huntethan hunt

Hi,

 

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