I created a visualforce email template that we use with our quote approval process, however some of the merge fields are not showing up on the email when submitted by certain users.
I used to have the same fields on a text version of the template and it works fine. The only thing I noticed that is different is the visual force is sent directly from the user's email, and the text version was sent from Salesforce on behalf of the same user.
Anyone know where this is controlled?
`<messaging:emailTemplate subject="Please Review this Quote"
recipientType="User" relatedToType="Quote">
<messaging:htmlEmailBody >
<html>
<body>
<STYLE type="text/css">
TH {font-size: 11px; font-face: arial; background: #CCCCCC;
border-width: 1; text-align: center}
TD {font-size: 11px; font-face: verdana}
TABLE {border: solid #CCCCCC; border-width: 1}
TR {border: solid #CCCCCC; border-width: 1; text-align: right}
</STYLE>
<p> Dear {!recipient.name}, </p>
<p>Please approve the following quote: {!relatedTo.QuoteNumber}.</p>
****Totals for Quote**** <br />
Total List Price: <apex:outputText value="{0, number, currency}">
<apex:param value="{!relatedTo.TotalPrice}" /></apex:outputText> <br />
Total Value of Free Goods: <apex:outputText value="{0, number,
currency}"><apex:param value="{!relatedTo.Total_Free_Goods__c}" />
</apex:outputText> <br />
Total Actual Cost: <apex:outputText value="{0, number, currency}">
<apex:param value="{!relatedTo.Total_Cost__c}" /></apex:outputText><br />
Gross Profit: <apex:outputText value="{0, number, 0.00}%"><apex:param
value="{!relatedTo.Gross_Margin__c}" /></apex:outputText> <br />
<br />
Promos: {!relatedTo.Promotions__c} <br />
<br />
**Totals for Calculator*** <br />
Calculator Total: <apex:outputText value="{0, number, currency}">
Calculator Cost:
Calculator GP:
***NEW - Calculator Discount =
Product
Description
List Price
Quantity
Subtotal
Discount
Total Price
Free Goods
Standard Promo
{!li.Product2.Name}
{!li.Product2.Description}
{!li.Quantity}
{!li.Free_Good__c}
{!li.Standard_Promotion__c}
Link to the
Quote
Dear {!recipient.name},
Please approve the following quote: {!relatedTo.QuoteNumber}.
****Totals for Quote****
Total List Price: {!relatedTo.TotalPrice}
Total Value of Free Goods: {!relatedTo.Total_Free_Goods__c}
Total Actual Cost: {!relatedTo.Total_Cost__c}
Gross Profit: {!relatedTo.Gross_Margin__c}%
Promos: {!relatedTo.Promotions__c}
**Totals for Calculator***
Calculator Total: {!relatedTo.Calculator_Price__c}
Calculator Cost: {!relatedTo.Calculator_Cost__c}
Calculator GP: {!relatedTo.Calculator_GP__c}%
***NEW - Calculator Discount = {!relatedTo.Calculator_Discount__c}%
[Product] - [Unit Price] - [Quantity] - [Total Price] - [Discount] - [Free
Goods] - [Standard Promo]
<apex:repeat var="li" value="{!relatedTo.QuoteLineItems}">
[{!li.Product2.Name}] - [{!li.UnitPrice}] - [{!li.Quantity}] -
[{!li.TotalPrice}] - [{!li.Discount}] - [{!li.Free_Good__c}] -
[{!li.Standard_Promotion__c}]
</apex:repeat>
</messaging:plainTextEmailBody>
</messaging:emailTemplate>`