• laurenk
  • 0 Points
  • Member since 2010

  • Chatter
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
  • 0

I'm trying to use VisualForce for the first time and since I have some HTML knowledge thought the email template might be the easiest place for me to start - I've got it complete but unfortunately keep getting errors upon save, here is what I have so far:


<messaging:emailTemplate recipientType="User"
subject="New Bookings{!relatedTo.Account.Name}"
<messaging:htmlEmailBody >
<b>Customer Name:</b> {!relatedTo.Account.Name} <br/>
<b>Date of Booking:</b> {!Opportunity.CloseDate} <br/>
<b>Total Committed Booking Amount:</b> {!Opportunity.Amount} <br/>
<b>Total At Risk Booking Amount:</b>{!OpptyLineItem__c.At_Risk_Bookings_Amount__c} <br/>
<b>Grand Total Booking:</b> {!Opportunity.Amount} <br/> <br/>

<table width="100%"
     style="border-style: solid; border-width: 1px; border-color: #00000">
<th>Volume (K)</th>
<th>CPM/CPL/Cost Per Month</th>
<td>{!relatedTo.OpptyLineItem__c.StartDate__c} - {!relatedTo.OpptyLineItem__c.EndDate__c} </td>

<b>Total:</b> {!Opportunity.Amount} <br/>
<b>Salesforce IO Number:</b> {!Opportunity.IONumber__c} <br/>
<b>Link to IO:</b> {!Opportunity.IO_Customer_URL__c} <br/>



I keep getting an error listed as: Unknown property 'core.email.template.EmailTemplateComponentController.Opportunity'


I suspect this is because I'm trying to call the related Account data and Opportunity Line Item data into the template but don't understand why it won't let me do that since both have direct relationships with the Opportunity object.



  • September 23, 2010
  • Like
  • 0