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
Esther Thomas 2Esther Thomas 2 

visualforce email template merge field formatting question

Hi There,
 I have a VF email template with some merge fields. One in particular is a formual field that should return a currency. It shows up properly in my record detail page, however in the template it's missing the second decimal place holder. Instead of $90.00 it shows up in the email as $90.0.
Any suggestions on how to fix this formatting issue? Thanks.
 
<messaging:emailTemplate subject="Congratulations on your booking" recipientType="Contact" relatedToType="Booking__c">
<messaging:htmlEmailBody >
<html>
  <body>

  <apex:image id="logo" value="https://c.na78.content.force.com/servlet/servlet.ImageServer?id=0151N000003mGyc&oid=00D1N000001DEQc"/>
<p>Congratulations!</p>
<p>You have a new booking {!recipient.FirstName}</p>
<p>Your client is {!relatedTo.Client__r.First_Name__c} </p>
<p>Total Payment: {!relatedTo.Total_Price__c}</p>
  </body>
</html>
</messaging:htmlEmailBody>
</messaging:emailTemplate>

User-added image

User-added image
Raj VakatiRaj Vakati
Use something like below 
<apex:outputText value="{0, number, 000,000.00}">
    <apex:param value="{!relatedTo.Total_Price__c}" />
</apex:outputText>