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
Srini GiridharSrini Giridhar 

Attachment related list on VF page for Task

Hi All,

I have created a VF page on the standard Task object. 

<apex:page tabStyle="Task" id="page1" standardController="task" extensions="CurrentTask" standardStylesheets="false"> 

I am using an extension class to customize the default behavior.

The issue I am having is, I am unable to show Attachments section just like the standard page does. I am using the following code to list the related list:

.....
.....
</apex:pageBlock>

</apex:form> 

<apex:pageBlock>
    <apex:pageblockSection title="Notes and Attachments" id="tabNoteAtt">
        <apex:relatedList subject="{!task}" list="CombinedAttachments"/>
    </apex:pageblockSection>
</apex:pageBlock>   

</apex:page>

am I doing anything wrong? I appreciate your help.

-Srini
PratikPratik (Salesforce Developers) 
Hi Srini,

This should work:

<apex:relatedList subject="{!task}" list="Attachments"/>

Try using Attachments instead of  CombinedAttachments.

Tasks have only attachments. Combinedattachments are used for crm content.

Thanks,
Pratik

P.S. If this answers you question, please mark it as "Best Answer" so it will help other community members too.