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
Will Sun 14Will Sun 14 

Error: Unknown property 'core.email.template.EmailTemplateComponentController.Case'

Hi, 
I need some helps with Visualforce email template, I have received error
Error: Unknown property 'core.email.template.EmailTemplateComponentController.Case'

I have try to capture all asset product and serial number captured in the email related to a Case. And currently relate structure is below:
Case related Asset Booking with Asset and Serial number.

Here is the code I have entered

<messaging:emailTemplate subject="I am Product Loan Approved" recipientType="Contact" relatedToType="Case">
<messaging:plainTextEmailBody >
    <html>
        <Body>
            <Style type="text/css">
                TH{font-size:11px; font-face:arial;background: #CCCCCC;border-width:1;text-align:center}
                TD {font-szie: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>Hi {!Case.Contact},</p>
<br/>
<p>Thank you for submitting an equipment loan</p>
<p>Your Loan request has been approved and we will be in touch once the equipment has been dispatched or ready for pickup</p>
<br/>
<p>Please refer loan product details below: </p>
<table border="0">
    <tr>
        <th>Product Name</th>
        <th>Serial Number</th>
    </tr>
    <apex:repeat var="cx" value="{!relatedTo.Asset_c}">
        <tr>
            <td>{!cx.Asset_Product__c}</td>
            <td>{!cx.Serial_number__c}</td>
        </tr>
    </apex:repeat>
</table>
<p />
</font>
</body>
</html>
</messaging:plainTextEmailBody>
</messaging:emailTemplate>
Ajvad AjuAjvad Aju
Hi Will Sun,

Can you try the same code with a slight change of value="{!relatedTo.Asset__c}" instead of value="{!relatedTo.Asset_c}".
And inform here that, getting same error or anything else.

Regards
Will Sun 14Will Sun 14
Hi Ajvad Aju,

Thank you for your reply, I have changed to "{!relatedTo.Asset__c} still with same error. Also I have try to change to "{!relatedTo.Asset_Booking__c} which is the API number related list to Case

Will