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
L0bster1L0bster1 

Hyperlink Subject in related list of tasks

I can create the related list of tasks that I want, except that the subject field is presented as text instead of as a hyperlink to the task record. Does anyone know why the code below doesn't work? See code in red.

 

 

<apex:page standardController="Contact" extensions="sampleDetailPageCon">
<apex:pageblock id="CustomList" title="Sales Activities"  >
   <apex:pageBlockTable value="{!tsk}" var="o" rendered="{!NOT(ISNULL(tsk))}">
        <apex:column value="{!o.Activitydate}"/>
 
  <apex:outputLink value="https://na8.salesforce.com/{!o.ID}">{!o.subject}</apex:outputLink>
    
        <apex:column value="{!o.This_Task_is_a__c}"/>
        <apex:column value="{!o.Ownerid}"/>
   </apex:pageBlockTable>
 </apex:pageblock>
</apex:page>

 

Best Answer chosen by Admin (Salesforce Developers) 
L0bster1L0bster1

I figured it out. Code below for the benefit of others:

 

<apex:page standardController="Contact" extensions="sampleDetailPageCon">
<apex:pageblock id="CustomList" title="Sales Activities"  >

<apex:form >
   <apex:pageBlockTable value="{!tsk}" var="o" rendered="{!NOT(ISNULL(tsk))}">
        <apex:column value="{!o.Activitydate}"/>
<apex:column >
  <apex:facet name="header">Subject</apex:facet>
  <apex:outputLink value="https://na8.salesforce.com/{!o.id}" target="blank">{!o.subject}</apex:outputLink>
</apex:column>           
        <apex:column value="{!o.This_Task_is_a__c}"/>
        <apex:column value="{!o.Ownerid}"/>
   </apex:pageBlockTable>
   </apex:form>
 </apex:pageblock>
</apex:page>