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
Dhananjaya BulugahamulleDhananjaya Bulugahamulle 

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 

User-added image
 
<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();
        }
    }

 
Best Answer chosen by Dhananjaya Bulugahamulle
Andy BoettcherAndy Boettcher
You'll want to do something like this:
 
<apex:pageBlockTable value="{!pbs}" var="p">
            <apex:column headerValue="Name">
                <apex:outputLink value="/{!p.Id}">{!p.Name}</apex:outputLink>
            </apex:column>
            <apex:column value="{!p.RecordTypeId}"/>
            <apex:column value="{!p.Createddate}"/>
</apex:pageBlockTable>