• laurenk
  • NEWBIE
  • 0 Points
  • Member since 2010

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

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"
relatedToType="Opportunity"
subject="New Bookings{!relatedTo.Account.Name}"
replyTo="new_bookings@spiceworks.com">
<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">
<u><tr><th>Timeframe</th>
<th>Product</th>
<th>Description</th>
<th>Geo</th>
<th>Volume (K)</th>
<th>CPM/CPL/Cost Per Month</th>
<th>Value</th>
</tr></u>
<tr>
<!--{!relatedTo.OpptyLineItem__c.Name}-->
<td>{!relatedTo.OpptyLineItem__c.StartDate__c} - {!relatedTo.OpptyLineItem__c.EndDate__c} </td>
<td>{!relatedTo.OpptyLineItem__c.ProductId__c}</td>
<td>{!relatedTo.OpptyLineItem__c.Description__c}</td>
<td>{!relatedTo.OpptyLineItem__c.Region__c}</td>
<td>{!relatedTo.OpptyLineItem__c.Quantity__c}</td>
<td>{!relatedTo.OpptyLineItem__c.ListPrice__c}</td>
<td>{!relatedTo.OpptyLineItem__c.Total__c}</td>
</tr>
</table><br/><br/>

<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/>
</messaging:htmlEmailBody>
</messaging:emailTemplate>

 

 

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.

 

Help!

  • September 23, 2010
  • Like
  • 0