You need to sign in to do that
Don't have an account?
Marty Lavender
Misc table errors when attempting to create VF Email Template
I created the below code for an email template. I get misc errors regarding closing tags for certain opening tags. The closing tags are present. I am not sure why this is happening.
<body style="margin: 0; padding: 0;"> <table border="0" cellpadding="0" cellspacing="0" width="100%"> <tr> <td style="padding: 10px 0 30px 0;"> <table align="center" border="0" cellpadding="0" cellspacing="0" width="600" style="border: 1px solid #cccccc; border-collapse: collapse;"> <tr> <td align="center" bgcolor="#fff" style="padding: 40px 0 30px 0; color: #153643; font-size: 28px; font-weight: bold; font-family: Arial, sans-serif;"> <img src="21CT_Color_75x75.png" alt="21CT Support" width="75" height="75" style="display: block;" /> </td> </tr> <tr> <td bgcolor="#ffffff" style="padding: 40px 30px 40px 30px;"> <table border="0" cellpadding="0" cellspacing="0" width="100%"> <tr> <td style="color: #153643; font-family: Arial, sans-serif; font-size: 24px;"> <b>A new case has been opened for you</b> </td> </tr> <tr> <td style="padding: 20px 0 30px 0; color: #153643; font-family: Arial, sans-serif; font-size: 16px; line-height: 20px;"> Dear {!Case.Contact,Sir or Madam}, </p> Thank you for contacting 21CT Support. </p> A new case has been created and assigned to a member of the 21CT Support team. Your case number is {!Case.Id}. </p> If this case was opened via email, a member of the 21CT Support team will be contacting you shortly. If you have already spoken with a member of our support team, please feel free to respond to this email with any additional information or questions you may have regarding your support issue. </p> <br/> <br/> <br/> <br/> <br/> <br/> <small >**When responding, please do not edit any existing text already placed in the email as this helps us track of your case.</small> </td> </tr> <tr> </tr> </table> </td> </tr> <tr> <td bgcolor="#159C91" style="padding: 30px 30px 30px 30px;"> <table border="0" cellpadding="0" cellspacing="0" width="100%"> <tr> <td style="color: #ffffff; font-family: Arial, sans-serif; font-size: 14px;" width="75%"> ® 21CT 2014<br/> </td> <td align="right" width="25%"> <table border="0" cellpadding="0" cellspacing="0"> <tr> <td style="font-family: Arial, sans-serif; font-size: 12px; font-weight: bold;"> <a href="http://www.21ct.com" style="color: #ffffff;"> <img src="lynxeonlogo" alt="Twitter" width="38" height="38" style="display: block;" border="0" /> </a> </td> <td style="font-size: 0; line-height: 0;" width="20"> </td> <td style="font-family: Arial, sans-serif; font-size: 12px; font-weight: bold;"> <a href="http://www.21ct.com" style="color: #ffffff;"> <img src="torchlogo" alt="Facebook" width="38" height="38" style="display: block;" border="0" /> </a> </td> </tr> </table> </td> </tr> </table> </td> </tr> </table> </td> </tr> </table> </body> </html>
And all variable will look like {!relatedTo.Contact} or {!relatedTo.Id}
All Answers
Try to use some html validation service.
Eg http://validator.w3.org/check
Dear {!Case.Contact,Sir or Madam}, </p> - you close tage without opening it
I think should be like {!Case.Contact},Sir or Madam
If yes, then fix code from {!Case. to {!retatedTo.
For some reason when I have
{!Case.Contact,Sir or Madam} and {!CaseiD} in the template, I get this error: Error: Unknown property 'core.email.template.EmailTemplateComponentController.Case'
If I take those variables out, I can save the template with no error.
And all variable will look like {!relatedTo.Contact} or {!relatedTo.Id}
Thanks.