+ Start a Discussion
tvance007tvance007 

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.

 

Thanks,

TehNrdTehNrd

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

 

http://community.salesforce.com/sforce/board/message?board.id=Visualforce&message.id=10404&query.id=21621#M10404

 

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
tvance007tvance007

Thanks for the reply and reference to the other thread.