2

Is it possible to add a document to the "Email Quote" button from the Quote object?

enter image description here

Our sales team need to send an intro.pdf with the quote object.

Using URL Hacking, I am only able to add a single doc_id to the email page. Adding an attachment to the EmailAuthor page

Is it possible to add 2 documents ?

How can I add the document by default?

1 Answer 1

1

If you want more than one document, I recommend you look at this post by @Eyescream which refers to blog posts by Jeff Douglass and a Helper Class that creates a map of the pages to be rendered as a single attachment. It's an answer to a question describing a solution someone came up with for doing the type of thing you describe.

For a single document, if you don't want to preview the document, use getContentAsPDF in a custom button to add it to an email template. If you want to preview the PDF first, see @MichaelWelburn Blog Post on how to do it via a button. You may also want to view @CA_Peterson's answer to How to download a VF page as PDF and email it from a trigger?.

Another post that may be of interest would be too many nested getContent calls?.

2
  • Thank you for your answer, however, I am not interested to view any page as PDF. I have a quote pdf in the quote object. And when sending it, I want to attach (by default if possible) a second attachment.
    – Saariko
    Jul 21, 2015 at 9:13
  • 1
    Then create a custom button to get to your email template that uses getContentAsPDF as described in the 1st link of 2nd paragraph above. I can't seem to locate sample button code I have for this purpose. From a link on @MichaelWeldon Blog, tips on creating the button: raydehler.com/cloud/clod/….
    – crmprogdev
    Jul 21, 2015 at 13:31

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .