• Hemalatha Dacherla
  • NEWBIE
  • 0 Points
  • Member since 2017

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 1
    Replies

I created the following VF email template. However I am recieving the following Error: Unknown property 'core.email.template.EmailTemplateComponentController.Opportunity'

 

See VF email template below:

<messaging:emailTemplate subject="Channel Special Pricing Approval Request:{!relatedTo.name}" recipientType="User" relatedToType="Opportunity">
<messaging:plainTextEmailBody >
<html>
<body>
<p>
A new Channel Special Pricing Request has been submitted for your review and is pending your approval.  The link provided will take you to the opportunity in Salesforce.com.  If you are receiving this on your mobile devise, a summary of the opportunity details follows below the link.
</p>
<p>
You can approve or deny this request from your mobile devise by replying to this message and typing approved or rejected in the first line of the email body.  You may add any additional comments in the second and subsequent lines.  The additional comments will be added to your approval or denial record.
</p>
 <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">  
 <table border="0" >
                 <tr > 
                     <th>Action</th><th>Product Name</th><th>Quantity</th><th>Disti Price</th><th>Discount%</th><th>Discount $</th><th>Discount 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.ListPrice,0)}</td>
           <td>{!ROUND(opp.Discount__c,0)}</td>
           <td>{!ROUND(opp.Discount,0)}</td>
           <td>{!ROUND(opp.Requested_Price__c,0)}</td>
       </tr>
    </apex:repeat>                 
       </table>
       <p />
 </font>
<h4>Opportunity Detials:</h4>
<table border="1">
<tr>
<th>Opportunity Name: {!Opportunity.Name}</th>
<th>Channel Request Authorization: {!Opportunity.ChannelRequestAuthorization__c}</th>
</tr>
<tr>
  <td>QLogic Sales Person (Opportunity Owner):</td>
  <td>{!Opportunity.OwnerFullName}</td>
</tr>
<tr>
  <td>Distributor:</td>
  <td>{!Opportunity.Distributor__c}</td>
</tr>
<tr>
  <td>Reseller:</td>
  <td>{!Opportunity.Reseller__c}</td>
</tr>
<tr>
  <td>End User:</td>
  <td>{!Opportunity.Account}</td>
</tr>
<tr>
  <td>End User Website:</td>
  <td>{!Account.Website}</td>
</tr>
<tr>
  <td>Competitor:</td>
  <td>{!Opportunity.Competitor1__c}</td>
</tr>
<tr>
  <td>Partner Status:</td>
  <td>{!Opportunity.Partner_Status__c}</td>
</tr>
<tr>
  <td>Opportunity Comments:</td>
  <td>{!Opportunity.OpportunityComments__c}</td>
</tr>
<tr>
  <td>Opportunity Amount:</td>
  <td>{!Opportunity.Amount}</td>
</tr>
<tr>
  <td>Approved Opportunity Value:</td>
  <td>{!Opportunity.Approved_Opportunity_Value__c}</td>
</tr>
<tr>
  <td>POS Value Claimed:</td>
  <td>{!Opportunity.POS_Value_Claimed__c}</td>
</tr>
<tr>
  <td>Net Opportunity POS:</td>
  <td>{!Opportunity.Net_Opportunity_POS__c}</td>
</tr>
<tr>
  <td>Total Credit Claimed:</td>
  <td>{!Opportunity.Total_Credit_Claimed__c}</td>
</tr>
<tr>
  <td>Max Discount %:</td>
  <td>{!Opportunity.Max_Discount__c}</td>
</tr>
</table>
</body>
</html>
</messaging:plainTextEmailBody>
</messaging:emailTemplate>