3

I want to attach a pdf in a salesforce email by selecting an email template.I have created one visualforce template by which I am able to attach the pdf to the mail.But my requirement is user can edit the email body like the html template and the attached pdf will get refreshed reflecting the changes,Appreciate your help!

4
  • 2
    Can you make a (large) text field on the object, call it "Email Notes" or something? They'd have to fill it in before they click "send an email & pick template" though
    – eyescream
    Commented Dec 17, 2013 at 14:54
  • If I will make any large text field.How it can be used as a email template? Commented Dec 26, 2013 at 9:41
  • By simply using the field APi name in that template, like any other field coming from the object? {!relatedTo.Email_Notes_field__c} or something... Just put this reference both in the email body and in the PDF attachment's section.
    – eyescream
    Commented Dec 27, 2013 at 1:37
  • We need to provide user to edit the template as in case of html template.I deisgned one visualforce template with email body and attachment.Things are working fine.When user select a template pdf is getting attached to the email.But user will not be able edit the visualforce template. Commented Dec 27, 2013 at 9:42

1 Answer 1

1

Make the email by rendering a Visualforce page as a pdf. There is lots of sample code if you search Developerforce for Email - with quote2pdf, sending SingleEmailMessage, and more.

You must log in to answer this question.

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