You need to sign in to do that
Don't have an account?
Pavani Akella 9
table related list on email template
I have written a visualforce page but I'm stuck how to keep the table spacing(lines) and also how to add few other fields:
I would like to add the below fields:
Please order replacements parts for the following case.
Case Number:
Case Subject: TEST CASE
Claim Type: Warranty
The link to the case is below. https://cs1.salesforce.com/500S0000008x9mL
And also I would like to see a line spacing between each row
<messaging:emailTemplate recipientType="Contact"
relatedToType="Case"
subject="Test: "
replyTo="support@acme.com" >
<messaging:htmlEmailBody >
<html>
<body>
<STYLE type="text/css">
TH {font-size: 12px; font-face: arial;background: #CCCCCC; border-width: 1; text-align: center }
TD {font-size: 12px; font-face: verdana }
TABLE {border: solid #CCCCCC; border-width: 1}
TR {border: solid #CCCCCC; border-width: 1}
</STYLE>
<font face="arial" size="4">
Dear {!recipient.name},
<p>Please order replacements parts for the following case</p>
[ CaseNumber ] - [ Subject] - [ Claim_Type_new]
<table border="0" >
<tr >
<th>Part Name</th><th>Description</th>
</tr>
<apex:repeat var="cx" value="{!relatedTo.Replacement_Parts__r}">
<tr>
<td>{!cx.Replacement_Item__c}</td>
<td>{!cx.Description__c}</td>
</tr>
</apex:repeat>
</table>
<p />
</font>
</body>
</html>
</messaging:htmlEmailBody>
</messaging:emailTemplate>
Can someone help me how to do? Thanks in advance
I would like to add the below fields:
Please order replacements parts for the following case.
Case Number:
Case Subject: TEST CASE
Claim Type: Warranty
The link to the case is below. https://cs1.salesforce.com/500S0000008x9mL
And also I would like to see a line spacing between each row
Part Name | Description |
a1XS0000001eJ05MAE | DNO - B28 - BRACKET- SRM - REWORKED |
a1XS0000001eJ0FMAU | WASHER - 19/32in ID X 1-11/64in OD - 11/64in THICKNESS - AL |
a1XS0000001eJ07MAE | CLAMP - 1/2in EPDM CUSH GALVANIZED MED DUTY - HOLE DIAMETER |
<messaging:emailTemplate recipientType="Contact"
relatedToType="Case"
subject="Test: "
replyTo="support@acme.com" >
<messaging:htmlEmailBody >
<html>
<body>
<STYLE type="text/css">
TH {font-size: 12px; font-face: arial;background: #CCCCCC; border-width: 1; text-align: center }
TD {font-size: 12px; font-face: verdana }
TABLE {border: solid #CCCCCC; border-width: 1}
TR {border: solid #CCCCCC; border-width: 1}
</STYLE>
<font face="arial" size="4">
Dear {!recipient.name},
<p>Please order replacements parts for the following case</p>
[ CaseNumber ] - [ Subject] - [ Claim_Type_new]
<table border="0" >
<tr >
<th>Part Name</th><th>Description</th>
</tr>
<apex:repeat var="cx" value="{!relatedTo.Replacement_Parts__r}">
<tr>
<td>{!cx.Replacement_Item__c}</td>
<td>{!cx.Description__c}</td>
</tr>
</apex:repeat>
</table>
<p />
</font>
</body>
</html>
</messaging:htmlEmailBody>
</messaging:emailTemplate>
Can someone help me how to do? Thanks in advance
Below are the changes you should make to your html code also change the field api names accordingly
Let me know if this helps.
Thanks,
Sukanya Banekar
You need to do following changes in your code -
1. Add the required rows in the header and in the repeat part
2. Add cellspacing to the table to apply spacing
If cellspacing doesn't work for you then try using a height property by adding CSS class to tr