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
catchforshivacatchforshiva 

How to display contact details when click commandLink button?

 

Hi ....

 

 

my questions ?

 

When you are click the commandLink (that is Contact Name), i want display the Contact

record details.

 

When I'm trying this, it only refreshing, but it is not redirect to the Contact records details. The code is below once's check it.

 

Could you plz let me know this scenario...

 

 

Thanks & Regards

Shiva.

 

 

 

Visualforce Page:
     

<apex:page standardController="Contact" recordSetVar="cons" extensions="pagecls">

<apex:form >

<apex:pageblock id="pb"> 

 

<apex:pageblocktable value="{!cons}" var="c">

 

<apex:column headerValue="Name"> 

        <apex:commandLink value="{!c.name}">               

            <apex:param value="{!c.Id}" name="q"/>           

        </apex:commandLink>      

</apex:column>

        

        <apex:column value="{!c.Phone}"/>
        <apex:column value="{!c.fax}"/>

</apex:pageblockTable> <br></br>

 

<apex:commandButton value="Previous" rendered="{!hasPrevious}" action="{!previous}" reRender="pb"/>&nbsp;&nbsp; &nbsp;&nbsp;

<apex:commandButton value="Next" rendered="{!hasNExt}" action="{!next}" reRender="pb"/>

 

</apex:pageblock>

</apex:form>

</apex:page>

 

 

Apex Class:

 

public with sharing class pagecls {

public pagecls(ApexPages.StandardSetController controller) {

controller.setPageSize(5);

}  }

SRKSRK
so you want that if some one click on the contact name it will show the details of that contact within that page or in some pop up
Not redirect to the details page ????
Am i rite ???
catchforshivacatchforshiva

Yes SRK.

 

If some one click on the contact name it will show the details of that contact within that page.

 

 

 

 

Thanks

Shiva.