1

I am trying to send an email using URL hacking and using standard salesforce Email functionality.

I will be coming to this page using Opportunity PDF. Problem is how to show an attachment down below in the attached files of this page.

I did R&D and found that only document can be visible and not attachment.Is there a way i can show the attachment and send that attachment in the email..

If this is not possible.We cannot make the attachment visible.Can i send the attachment using code but only from that standard email author page..?

https://cs16.salesforce.com/_ui/core/email/author/EmailAuthor?doc_id=00Pf0000000x1HuEAI&p3_lkid=006f0000004fKcj
2
  • You cannot use emailauthor in Apex code. If you want to extract your Opportunity PDF and send it as an attachment, you will have to use getContent() method of Pagereference class. However, there are certain limitations with this method. I don't think if the overall requirement can be completed through standard process. Commented Jun 22, 2015 at 4:01
  • If you want to know more about email author, you can refer this - salesforce.stackexchange.com/questions/78925/… Commented Jun 22, 2015 at 4:02

2 Answers 2

1

See @Phil Hawthorne's answer to getContent() returns Blob PDF-body in console, but HTML page (rendered like PDF) in Email service code where he recommends putting the PDF into a VF template, create a new record when you do & then having workflow send the actual email which doesn't count against your Apex daily limits. Perhaps that solution might serve your purposes.

I believe if you do a search of posts here on SF.SE, you'll find at least one or two that ask about rendering to PDF and sending an email at the same time. I'm fairly certain you can do that with button code and a template.

1

the solution is very simple - you should clone the email template and associate the attachments to it. then use the clone emailtemplate in the URL redirect. and don't forget to add to the URL - +'&new_template=1' otherwise, it will not be displayed.

You must log in to answer this question.

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