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
Everton CP7Everton CP7 

Show all the attachments with the same "related to"

Hi there,

 

I'm trying do a column that will show me all the files that have been attached in all the tasks.

 

For example:
I created a task in the case, (the task is related to a case) I attached a file in there and I completed the task.
I created another task in the same case and I need to appear to me the file that have been attached in the first task.

And so on.

 

I put this code in my VF page.

It works if I'm in the same task I have attached the file.

 

<apex:pageBlockTable value="{!task.Attachments}" var="attach">
   <apex:column value="{!attach.name}"/>
   <apex:column value="{!task.subject}"/>
</apex:pageBlockTable>

 

Thanks!