You need to sign in to do that
Don't have an account?
Srini Giridhar
Need help in displaying related list on a VF page
I have created a VF page similar to standard Task page. However, I am unable to display attachments section in related list.
here is what I am doing in the apex page.
....
....
</apex:form>
<apex:pageBlock >
<apex:pageblockSection title="Notes and Attachments" id="tabNoteAtt">
<apex:relatedList list="Attachments" subject="{!task}"/>
</apex:pageblockSection>
</apex:pageBlock>
</apex:page>
Am I missing something? I appreciate your help.
here is what I am doing in the apex page.
....
....
</apex:form>
<apex:pageBlock >
<apex:pageblockSection title="Notes and Attachments" id="tabNoteAtt">
<apex:relatedList list="Attachments" subject="{!task}"/>
</apex:pageblockSection>
</apex:pageBlock>
</apex:page>
Am I missing something? I appreciate your help.
<apex:relatedList subject="{!task}" list="NotesAndAttachments" />
I tried this and also list="CombinedAttachments" but it doesnt list anything.
Also, I dont even see "Attach File" button I see on the standard task page.
Thanks,
-Srini
<apex:relatedList list="CombinedAttachments" />
you dont need to use subject="{!task}" or you have to use subject="{!task.id}"
apex/yourpage?id=a3en00000004Jmt
I tried both now. still no luck.
Little info that may help. I have added a button called "Custom Task" on account object. on click of this button, my custom VF page for adding new task will open. It is here that I want to display the attachments. just like it would happen in the standard "new task" functionality.
my doubt is, can we have related list in the add record (edit) mode? I understand that a task id is required to get the related list but the task and attachment both would be added on the same screen. In that case the task id would be empty. Isn't it?
-Srini
http://www.forcetree.com/2011/02/upload-file-as-attachment-to-record.html