function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Coral RacingCoral Racing 

VisualForce Email Template Help with Nested Tables

Hello

I have created the following email template:

<messaging:emailTemplate subject="Attention! Update for P1 Incident for Service {!relatedto.P1_Sevice_Category_for_Business_Comms__c} (Ref:IN:{!relatedto.Name})" recipientType="User" relatedToType="BMCServiceDesk__Incident__c">
<messaging:htmlEmailBody >


<html>
<body>

<apex:image url="https://c.cs18.content.force.com/servlet/servlet.ImageServer?id=015110000009VFN&oid=00D110000006XnK" width="100" height="30"/>

<STYLE type="text/css">
TH {font-size: 14px; font-face: Ariel;background: #C6DBEF; border-width: 1;  width: 600px; text-align: left }
TD {font-size: 14px; font-face: Ariel; text-align: left; }
TABLE {border: solid #CCCCCC; border-width: 1}
TR {border: solid #000000; border-width: 1; vertical-align: top; text-align: left; width: 600px;}
</STYLE>
<font face="ariel" size="2">

<p></p>
<h2>Coral Retail Priority 1 Incident Update   </h2>

<p></p>


<table border="0" >


<tr >

<th>Incident Description</th><th colspan = "1">{!relatedTo.BMCServiceDesk__incidentDescription__c}</th>


</tr>

<tr >

<th>Impact Analysis</th><th colspan = "1">{!relatedTo.Impact_Analysis__c}</th>

</tr>

<tr >

<th>Business Incident Update Notifications</th><th colspan = "1"><apex:outputField value="{!relatedTo.HTML_History_Notes__c }"></apex:outputField></th>  

</tr>



                 
  </table>
  <p />
  <p>
<p>
</p>

</p>
   </font>
        </body>
     </html>
</messaging:htmlEmailBody>

 </messaging:emailTemplate>


However I am now wanting to put the vaulu highlighted in bold above into another nested table so I the value doesn't overun across the page but is wrapped with a determining width such as 60%

Can anyone help?

Many thanks

Sonya
sandeep sankhlasandeep sankhla
Hi Sonya,

You can replace all your Th with TD adn then you can use word-wrap style for breaking them and also if you want to make them bold then also by styling you can do..no need of th

<span style="word-wrap:break-word;">  22222222222</span>

use span inside td to display the value..inside this span you can display your long text and that will automatically break into next line..

Please check with these and ley me know if you need any help

P.S. If my answer helps you to solve your problem please mark it as best answer. It will help other to find best answer.

Thanks,
Sandeep
Salesforce Certified Developer