I'm trying to create a custom attachments list for the Account object via a visualforce page to replace the standard attachments related list Salesforce provides, which makes finding an attachment very difficult with all children attachments rolling up to the parent.
At this point, I have a custom visualforce page which lists only attachments associated with the account, ignoring all children attachments. I'm trying to reuse standard actions instead of having to recreate them in a controller. So, I have added the hyperlinks to View and Edit the attachment, but I'm having issues with the Delete attachment hyperlink, which is supposed to call the deleteredirect.jsp, but it needs a CONFIRMATIONTOKEN.
I tried to use URLFOR(), but it's not well documented and I'm not sure it works with Attachment. I've also searched through the Salesforce Apex documentation and through the web, but I couldn't find the correct answer. If I missed it for any reason, please feel free to point me to the right direction.