+ Start a Discussion
Makam RuthvikMakam Ruthvik 

How to attach PDF's along with email template without


I have two pdf's (let A and B)stored in documents both in different languages. So according to my recepients language if it dutch it should attach pdf A and if it is English it should attach pdf B. How can we achieve it?

If the location is other than documents like suppose notes and attachments then how to fetch from there?

Please help me out...Thanks in Advance!
ANUTEJANUTEJ (Salesforce Developers) 
Hi Makam,

This is just an idea but I think you can simply fetch the user LanguageLocaleKey that you can try using to decide and send an email with an attachment.

>> https://blog.jeffdouglas.com/2010/07/16/create-and-email-a-pdf-with-salesforce-com/

The above link shows a way to send an email with the attachment.

Let me know if it helps you and close your query by marking it as the best answer so that it can help others in the future.  

Makam RuthvikMakam Ruthvik
Hi Anutej,

Thanks a lot for replying and the link you provided is very helpful.

My exact scenario is there will be a pdf generated on files on my Order records with a unique name. I have to fetch the pdf that from the Order Record and add it as an attachment to my classic email template.

Can you please help me out here.