You need to sign in to do that
Don't have an account?
b.gonzalez
How do I have text appear uppercase on VF email tempalte?
There are specific data that needs to render in all caps in the VF email template. How do I write that into the VF email template?
This is section of code that needs be outputted in all caps.
Thanks!
Beth
This is section of code that needs be outputted in all caps.
<th>CUSTOMER INFO</th><th> </th> <tr> <td><b>Company:</b></td> <td>{!relatedTo.Contact.Account.Name}</td> </tr> <tr> <td><b>Address:</b></td> <td>{!relatedTo.Contact.MailingStreet}</td> </tr> <tr> <td><b>City:</b></td> <td>{!relatedTo.Contact.MailingCity} </td> </tr> <tr> <td><b>State:</b></td> <td>{!relatedTo.Contact.MailingState}</td> </tr> <tr> <td><b>Postal Code:</b></td> <td>{!relatedTo.Contact.MailingPostalCode}</td> </tr> <tr> <td><b>Country:</b></td> <td>{!relatedTo.Contact.MailingCountry}</td> </tr> <tr>Here is the entire code of the VF email template:
<messaging:emailTemplate recipientType="Contact" relatedToType="Case" subject="RMA ON DEMAND - {!relatedTo.CaseNumber} - {!relatedTo.ThreadID__c}"> <messaging:htmlEmailBody > <html> <table align="left" width="640px" border="0" cellspacing="0" cellpadding="0"> <head> <apex:image id="Logo" value="https://c.cs16.content.force.com/servlet/servlet.ImageServer?id=015f0000000GJGr&oid=00Df0000003cHuJ&lastMod=1440092921000"/> </head> <body> <STYLE type="text/css"> table {border-collapse:collapse; table-layout:fixed; width:600px;} table td {border:solid 1px #CCCCCC; width:100px; word-wrap:break-word;} H3 {color: #004488} TH {font-size: 14px; font-face: Tahoma; color: #004488; border: solid #CCCCCC; background: #dfdfdf; border-width: 1; text-align: left } TD {font-size: 13px; font-face: Tahoma } / TABLE{border: solid #CCCCCC; border-width: 1} TR {border: solid #CCCCCC; border-width: 1} </STYLE> <font face="Tahoma" size="2"> <br></br> <div>Hi Gayle,</div> <br></br> <div>Please process the following <b>RMA</b>. If there are any questions, please reply all.</div> <br></br> <table border="1" > <tr> <th>RMA INFO</th><th> </th> <tr> <td><b>RMA Type:</b></td> <td>{!relatedTo.RMA_Type__c}</td> </tr> <tr> <td><b>Case Number:</b></td> <td>{!relatedTo.CaseNumber}</td> </tr> <tr> <th>CUSTOMER INFO</th><th> </th> <tr> <td><b>Company:</b></td> <td>{!relatedTo.Contact.Account.Name}</td> </tr> <tr> <td><b>Address:</b></td> <td>{!relatedTo.Contact.MailingStreet}</td> </tr> <tr> <td><b>City:</b></td> <td>{!relatedTo.Contact.MailingCity} </td> </tr> <tr> <td><b>State:</b></td> <td>{!relatedTo.Contact.MailingState}</td> </tr> <tr> <td><b>Postal Code:</b></td> <td>{!relatedTo.Contact.MailingPostalCode}</td> </tr> <tr> <td><b>Country:</b></td> <td>{!relatedTo.Contact.MailingCountry}</td> </tr> <tr> <td><b>Contact Name:</b></td> <td>{!relatedTo.Contact.Name}</td> </tr> <tr> <td><b>Contact Phone:</b></td> <td>{!relatedTo.Contact.Phone} </td> </tr> <tr> <td><b>Contact Email:</b></td> <td>{!relatedTo.Contact.Email}</td> </tr> <tr> <th>PART INFO</th><th> </th> <tr> <td><b>Model Number:</b></td> <td>{!relatedTo.Model_Number__c}</td> </tr> <tr> <td><b>Outbound Part Number:</b></td> <td>{!relatedTo.Outgoing_Part__c}</td> </tr> <tr> <td><b>Outbound Serial Number:</b></td> <td>{!relatedTo.Outgoing_Serial__c}</td> <tr> <td><b>Inbound Part Number:</b></td> <td>{!relatedTo.Part_Number__c} {!relatedTo.Part_number_2__c} {!relatedTo.Part_number_3__c}</td> </tr> <tr> <td><b>Inbound Part Serial Number:</b></td> <td>{!relatedTo.SN__c} {!relatedTo.Serial_number_2__c} {!relatedTo.Serial_number_3__c} {!relatedTo.Serial_number_4__c}</td> </tr> <tr> <td><b>Chassis Serial Number:</b></td> <td>{!relatedTo.Chassis_Serial_Number_1__c} </td> </tr> <tr> <td><b>Problem Description:</b></td> <td>{!relatedTo.Detailed_Problem_Description_1__c} </td> </tr> </tr> </tr> </tr> </tr> </table> <br></br> <div>Thanks,</div> <div>{!relatedTo.Owner.Name} </div> </font> </body> </table> </html> </messaging:htmlEmailBody> </messaging:emailTemplate>
Thanks!
Beth
Please use the below code : You can also use style="text-transform:uppercase;" in Table directly instead of each <tr>, if you want to show all text in uppercase in the table.
Please let me know if I can help you more
Thanks,
Vishal
All Answers
you can use one more css in side your stylesheet tag as:
keep this block before line number 20 as per your code posted.
changeTouppercase {
text-transform: uppercase;
}
in whihc text you want to make as upper use thi stsyle sheet.
ex: from your coe if you wil change line 39 to
<th class="changeTouppercase ">CUSTOMER INFO</th><th> </th>
line 42:
<td class="changeTouppercase ">{!relatedTo.Contact.Account.Name}</td>
so where you want to make it as upper case use this css as a class attribute.
please mark as best answer if it helps you.
thanks,
Deb
Please use the below code : You can also use style="text-transform:uppercase;" in Table directly instead of each <tr>, if you want to show all text in uppercase in the table.
Please let me know if I can help you more
Thanks,
Vishal
Ex:
{!UPPER('abc1a')}; => ABC1A
You could use related fields as well
Ex - {!UPPER(relatedTo.Contact.Account.Name)}
I think above should resolve the issue.
Thanks
Shashikant
Beth