You need to sign in to do that
Don't have an account?

How to direct a user to the record when he click on record number?
I have a record table. I want to make product brief number clickable. When user click on the product brief number it will take to the record (open the product brief). Does anybody have idea? Thanks

Extension
<apex:page standardController="Product_Brief__c" extensions="DispatcherContactNewController"> <apex:pageBlock > <apex:pageBlockTable value="{!pbs}" var="p"> <tr class="lnkdsble" ><apex:column value="{!p.Name}"/></tr> <apex:column value="{!p.RecordTypeId}"/> <apex:column value="{!p.Createddate}"/> </apex:pageBlockTable> </apex:pageBlock> <apex:panelGrid columns="4"> <apex:commandLink action="{!first}">First</apex:commandlink> <apex:commandLink action="{!previous}" rendered="{!hasPrevious}">Previous</apex:commandlink> <apex:commandLink action="{!next}" rendered="{!hasNext}">Next</apex:commandlink> <apex:commandLink action="{!last}">Last</apex:commandlink> </apex:panelGrid> </apex:pageBlock> </apex:form> </apex:page>
Extension
public class DispatcherContactNewController { public DispatcherContactNewController(ApexPages.StandardController controller) { this.controller = controller; } public ApexPages.StandardSetController setpb { get{ if (setpb == null) { setpb = new ApexPages.StandardSetController(Database.getQueryLocator( [SELECT Id, Name, RecordTypeId, Createddate FROM Product_Brief__c]) ); } return setpb; } set; } public List<Product_Brief__c>getpbs() { return (List<Product_Brief__c>)setpb.getrecords(); } public Boolean hasNext { get { return setpb.getHasNext(); } set; } public Boolean hasPrevious { get { return setpb.getHasPrevious(); } set; } public Integer pageNumber { get { return setpb.getPageNumber(); } set; } public void first() { setpb.first(); } public void last() { setpb.last(); } public void previous() { setpb.previous(); } public void next() { setpb.next(); } }

You'll want to do something like this: