+ Start a Discussion

How to set the name of a PDF file to default to a field value

I would like to default the name of a PDF file to the users to the opportunity name when they click the generate PDF quote button and save the PDF file. I can't seem to be able to set the pdf file name and it defaults to the form name.


This the code I am using is:


<apex:page standardController="Opportunity" showheader="false" contenttype="application/pdf#{!opportunity.name}.pdf">


Any help would be appreciated.




There is no way to define file name unless it is being sent in a Visualforce email template.




Would probably be a good idea....to create an idea. Wasn't a huge problem for me so I never did.

Message Edited by TehNrd on 09-17-2009 10:42 AM

Thanks for the reply and reference to the other thread.