+ Start a Discussion

Attaching Knowledge Articles as PDFs in Apex driven emails

I am trying to figure out how to get my Knowledge Articles attached to outbound emails when they are driven by Apex.  I have a text template with the merge field {!Case.Articles_as_PDFs} and that works perfectly fine when the template is manually selected, but no attachments are added when I'm using an Apex based send email method.  I came across this and wonder if its related:




There seems to be no magic Articles as PDFs merge field available in a Visualforce template.  This leaves me thinking I need to manually build the attachment in the Visualforce template which I'm really hoping to avoid.


Any advice?



Please say you got a response to this ? :)

This would be really useful for us as well.


You do have to code it from hand; there is no magic merge field in VF.  Here is a starting point that my company created a while ago.  You can install this into your sandbox.




Here is a link to an article that might help you customize the package above.




I am not a developer and therefore can't answer any questions on this, but I hope it helps you some.


It is a very good read and helps me much.


Thank you !