You need to sign in to do that
Don't have an account?

How to define the name of a file saved from a PDF rendered visualforce page
I have a visualforce page rendered as a PDF called "Agreement" that is generated from a button on a custom object called "Agreements". The "Agreements" object has a field that identifies the Account (standard SF object) the Agreement is associated with. When saving or downloading the PDF, the name of the file is always the name of the visualforce page (Agreement.pdf). How can I define the file name when saved or downloaded as the following:
Account: Demo Tech,LLC.
Save PDF filename: Demo Tech,LLC._Agreement_Today's Date
PS. I know this has been asked before by others, but the apex class "solutions" I've read did not work for me.
Please mark this as the best answer if this solution helped you.
Click the button called pdf
Click the button called Save to PDF and check the result
Thanks,
Prashant
(A)
(B)