Can anyone help me out with a VisualForce email template? VisualForce is all new to me, and quite over my head. I have gotten this far, but it does not send through a workflow or even through a test.
<messaging:emailTemplate recipientType="Contact"
relatedToType="Opportunity"
subject="Productline Items for Opportunity: {!relatedTo.name}"
replyTo="support@acme.com" >
<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}
</STYLE>
<font face="arial" size="2">
<p>Dear {!recipient.name},</p>
<p>Below is a list of products related to the Opportunity:<b> {!relatedTo.name}</b>.</p>
<br/>Account: <i> {!relatedTo.Account.name} </i>
<br/>OEM: {!relatedTo.OEM__c}
<br/>Podio ID: {!relatedTo.Podio_ID_Opp__c}
<br/>Podio Link- Dealer: {!relatedTo.Podio_Link__c}
<br/>Opportunity Owner: {!relatedTo.owner.name}
<br/>Signer: {!relatedTo.Signer_Information__c}
<br/>Dealer Type: {!relatedTo.Dealer_Type__c}
<br/>Address: {!relatedTo.Billing_Address__c}
<p/>
<br/>Notes for Implementation: {!relatedTo.Notes_for_Implementation__c}
<br/>Opportunity Amount: {!ROUND(relatedTo.Amount,0)}
<br/>Discount Percent: {!relatedTo.DiscountQ__c}
<br/>Expected Revenue: {!ROUND(relatedTo.ExpectedRevenue,0)}
<br/>Opportunity Close Date: {!relatedTo.CloseDate}
<br/>Opportunity Discount Request Notes: {!relatedTo.Discount_Request_Notes_Quote__c}
<br/>Opportunity Manager Notes on Discount: {!relatedTo.Manager_Approval_Notes_on_Discount_Quot__c}
<p/>
<br/>Dealer Group: {!relatedTo.Dealer_Group__c}
<br/>Podio Link- Dealer Group: {!relatedTo.Dealer_Group_Podio_Link__c}
<p/>
<table border="0" >
<tr >
<th>Action</th><th>Product Name</th><th>Quantity</th><th>Unit Price</th><th>Discount Amount</th><th>Total Price</th>
</tr>
<apex:repeat var="opp" value="{!relatedTo.OpportunityLineItems}">
<tr>
<td><a href="https://na1-blitz01.soma.salesforce.com/{!opp.id}">View</a> |
<a href="https://na1-blitz01.soma.salesforce.com/{!opp.id}/e">Edit</a></td>
<td>{!opp.PriceBookEntry.name}</td>
<td>{!ROUND(opp.Quantity,0)}</td>
<td>{!ROUND(opp.UnitPrice,0)}</td>
<td>{!ROUND(opp.Discount_Amount1__c,0)}</td>
<td>{!ROUND(opp.TotalPrice,0)}</td>
</tr>
</apex:repeat>
</table>
<p />
</font>
</body>
</html>
@Melissa Linn Hi Melissa, Can you post screenshots of your workflow logic and also a screenshot of how your template looks when you hit the "Send Test and Verify Merge Fields" button. It could help further in debugging. Also, please make sure email deliverability is set to "All Email" in your salesforce organization.