1

Supposing I have a VF page that generates a PDF quote - how can I arrange to automatically open that document for this user to review, without having any further user interaction? Currently, the user has to click a link to open the PDF, which is (obviously) one click too many ...

Thanks!

John

2
  • Are you saying that the PDF is currently generated by a Detail Page Link on the Quote Object? If no, how is the link created and where does it reside?
    – user17526
    Commented Mar 20, 2015 at 23:55
  • No, I'm saying that I have a VF page that generates a PDF quote. Once the quote is generated, it is saved as an attachment. I want to display that attachment automatically without user intervention.
    – user735
    Commented Mar 21, 2015 at 0:01

1 Answer 1

2

When a user views an attachment, the url is something like:

/servlet/servlet.FileDownload?file={!YOUR-ATTACHMENT-ID}

You can try redirecting to this url using PageReference when the Quote has been created successfully.

Also, a work-around could be to redirect to the VF page that you are using to generate the PDF, with the necessary parameters.

You must log in to answer this question.