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
Ayush Gupta 14Ayush Gupta 14 

How to HyperLink on One of Fields in FieldSet used In PageBlockTable

<apex:pageBlockTable var="exp" value="{!listOfExpense}">
<apex:outputLink value="/{!exp.Id}" target="_blank">{!exp.Name}</apex:outputLink>
        <apex:repeat value="{!fieldSetMember}" var="fs">
                 <apex:column value="{!exp[fs]}" />
                         
          </apex:repeat>
 </apex:pageBlockTable>

 
Best Answer chosen by Ayush Gupta 14
pradeep kumar yadavpradeep kumar yadav
<apex:pageBlockTable var="exp" value="{!listOfExpense}">
 <apex:column headerValu=''NAME''>
<apex:outputLink value="/{!exp.Id}" target="_blank">{!exp.Name}</apex:outputLink>
</apex:column>
        <apex:repeat value="{!fieldSetMember}" var="fs" first=''1">
                 <apex:column value="{!exp[fs]}" />
                         
          </apex:repeat>
 </apex:pageBlockTable>
You can skip one field from FieldSet and hyperlink that field in Pageblock table volumn
 

All Answers

Sharad SoniSharad Soni
Hello Ayush ,
if you want to create a hyperlink of object, then just create a formula field like i m describing below

HYPERLINK("https://ap5.salesforce.com/" & Id, Name )

then add this formula field to your field set and just display the field. NO need to make change any code
pradeep kumar yadavpradeep kumar yadav
<apex:pageBlockTable var="exp" value="{!listOfExpense}">
 <apex:column headerValu=''NAME''>
<apex:outputLink value="/{!exp.Id}" target="_blank">{!exp.Name}</apex:outputLink>
</apex:column>
        <apex:repeat value="{!fieldSetMember}" var="fs" first=''1">
                 <apex:column value="{!exp[fs]}" />
                         
          </apex:repeat>
 </apex:pageBlockTable>
You can skip one field from FieldSet and hyperlink that field in Pageblock table volumn
 
This was selected as the best answer