function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion

Visualforce email template asset error

Hi Guys - i have been search and trying things for the past 10 hours without getting any closer to success.


I am trying to setup a VF email template to send an email to contacts pulling in information from assets. I have based it on the example

I keep getting an error message of Error: Invalid field Asset for SObject Asset 

I have tried replacing Asset in this line with Assets Assets__c, Asset__c, Asset__r & Assets__rwhich i assume relates to the code in line24
when i leave the original example code of cases in it seems to work just fine. Hoping someone can see a super obvious error


<messaging:emailTemplate subject="Your Annual Maintenance on Isograph Products" recipientType="Contact" relatedToType="Asset">
<messaging:htmlEmailBody >
        <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}
        <font face="arial" size="2">
         <p>Dear {!},</p>
         <p>Below is a list of cases related to the account: {!}.</p>
          <table border="0" >
            <tr >
               <th>Product Name</th>
               <th>Maintenance Expiry</th>
               <th>Renewal Cost</th>
               <th>Discounted Pricing</th>
<apex:repeat var="cx" value="{!relatedTo.Asset}">