You need to sign in to do that
Don't have an account?
mat_tone_84
insert into template an attachment stored in opportunity
Hi,
I need to create a template for use into opportunity which get attachment stored into the opportunity into note&attachments.
I'm able to do this with a trigger but I'm not able to create a template.
My goal is to send an email and the receiver will be able to open pdf.
I try this code but I have a pdf with this text : "core.filemanager.ByteBlobValue@22ad1468"
<messaging:emailTemplate subject="test email" recipientType="Contact" relatedToType="Attachment">
<messaging:plainTextEmailBody >
test new template xxxx
</messaging:plainTextEmailBody>
<messaging:attachment renderAs="pdf" filename="filename.pdf">
{!relatedTo.body}
</messaging:attachment>
</messaging:emailTemplate>
I found some topic for convert "body" into a blobvalue or similar but I didn't solve the problem
I need to create a template for use into opportunity which get attachment stored into the opportunity into note&attachments.
I'm able to do this with a trigger but I'm not able to create a template.
My goal is to send an email and the receiver will be able to open pdf.
I try this code but I have a pdf with this text : "core.filemanager.ByteBlobValue@22ad1468"
<messaging:emailTemplate subject="test email" recipientType="Contact" relatedToType="Attachment">
<messaging:plainTextEmailBody >
test new template xxxx
</messaging:plainTextEmailBody>
<messaging:attachment renderAs="pdf" filename="filename.pdf">
{!relatedTo.body}
</messaging:attachment>
</messaging:emailTemplate>
I found some topic for convert "body" into a blobvalue or similar but I didn't solve the problem
Please refer following document and threads referring similar issue:
http://salesforce.stackexchange.com/questions/22251/insert-attachment-into-visualforce-email-template
http://salesforcetrekbin.blogspot.in/2010/05/visualforce-email-template-with.html
http://www.salesforce.com/us/developer/docs/pages/Content/pages_email_templates_with_apex.htm
the 3 links that you have posted don't show me what I want.
they explaine how create a template with the link to the pdf, and so the receiver of my email need to login on salesforce for see the pdf, instead I need that who receive my email don't need login on salesforce and can see the pdf as attachment of email
Have you got the solution for you issue, I am running into the same issue and have been struggling with it for the past 2 days. I would appreciate your response. Thanks !
thanks and regards
priya