You need to sign in to do that
Don't have an account?
Everton CP7
How I add the buttons on a related list
Hi there,
I put the related list in my VF page.
The related list appears to me, but the button to attach the files don't.
<apex:relatedlist list="Attachments"/>
How I add the button?
I tried add the button, without the related list:
<apex:commandbutton value="Anexar arquivo" onclick="window.open('/p/attach/ActivityAttach?relatedListId={!task.Id}_RelatedActivityAttachmentList&retURL=%2F{!task.Id}%2Fe%3Fclose%3D1%26retURL%3D%252F500U0000001q9ik&pid={!task.Id}&type=00T')" />
With this code I open a window to attach the file.
But when I finished the process to attach the file. The file don't get attached into the task.
I read some topics and finally I get it.
Code:
Code:
You have to save the record.
And you open the record again, the file you be in the related list "Attachments".
All Answers
I'll get you a better explanation.
I'm not creating a detail VF page.
I'm creating a VF page on tasks. I'll never use anymore the standard layout.
Even if I go to the layout page in tasks. I can't add buttons to "Related List Attachments".
"This list can't be customized."
When I enter in a task with standard layout.
I still can't see the button. The button just appears when I click in "Edit".
How about using apex:inputFile
Thanks Rahul, I don't know how appreciate your help.
I have already tried this one.
The problem here is the file will be attached in "Documents" and I need the file in my task, or in the case (the tasks will always be related to a case).
I don't know how I adapt this code to a task.
You know how?
I tried this :
And in my VF, I used :
Obviously didn't work, cause the first one is related to "case" and my VF is related to "task".
I read some topics and finally I get it.
Code:
Code:
You have to save the record.
And you open the record again, the file you be in the related list "Attachments".