<messaging:emailTemplate recipientType="Contact"
relatedToType="Account"
subject="Case report for Account: {!relatedTo.name}"
replyTo="support@acme.com"> <messaging:htmlEmailBody> <html> <body> <p>Dear {!recipient.name},</p> <p>Attached is a list of cases related to {!relatedTo.name}.</p> <center> <apex:outputLink value="http://www.salesforce.com"> For more detailed information login to Salesforce.com </apex:outputLink> </center> </body> </html> </messaging:htmlEmailBody> <messaging:attachment renderAs="PDF" filename="yourCases.pdf"> <html> <body> <p>You can display your {!relatedTo.name} cases as a PDF</p> <table border="0" > <tr> <th>Case Number</th><th>Origin</th> <th>Creator Email</th><th>Status</th> </tr> <apex:repeat var="cx" value="{!relatedTo.Cases}"> <tr> <td><a href = "https://na1.salesforce.com/{!cx.id}">{!cx.CaseNumber}
</a></td> <td>{!cx.Origin}</td> <td>{!cx.Contact.email}</td> <td>{!cx.Status}</td> </tr> </apex:repeat> </table> </body> </html> </messaging:attachment> </messaging:emailTemplate>
Thanks & Regards,
Krishnanand Gupta
+91-9410670463,+91-9015574663
http://www.kg91.weebly.com
No comments:
Post a Comment