+ Start a Discussion
Coral RacingCoral Racing 

Error: Unknown property 'core.email.template.EmailTemplateComponentController.ih'?

Hello
I am trying to write an vf email template as follows but keep getting this error message.  Can anyone shed any light as to why?  It is Line 84 (the section I have put in bold text) that is causing the error I think, but I don't know why?  I am learning as I go along, so please bear with me if it is something very obvious!!!  I appreciate any advice.  Thanks

<messaging:emailTemplate subject="A Business Priority 1 Incident #(Ref:IN:{!relatedto.Name}) has been Created for Service {!relatedTo.BMCServiceDesk__FKBusinessService__r.name}" recipientType="User" relatedToType="BMCServiceDesk__Incident__c">
<messaging:htmlEmailBody >
<html>
<body>

<apex:image url="https://c.cs18.content.force.com/servlet/servlet.ImageServer?id=015110000009VFN&oid=00D110000006XnK" width="100" height="30"/>

<p></p>
<h2>Coral Retail Priority 1 Business Notification  </h2>

<p></p>


<style type="text/css">
            body {font-family: Ariel; size: 12pt;}
            .left {FONT-FAMILY: Ariel; COLOR:#FFFFFF; BACKGROUND: #1669BC}
            .right {FONT-FAMILY: Ariel; COLOR:#000000; BACKGROUND: #C6DBEF}
            
            
td {
            border-width: 1px;
            padding: 1px;
            border-style: solid;
            border-color: #000000;
            
        }
        
    

        th { 
            color: #000000;
            border-width: 1px ;
            padding: 1px ;
            border-style: solid ;
            border-color: #000000;
          
        }
        

        </style>



<table>



<tr>
<td class = "left"><b>Incident Description</b></td>
<td class = "right">{!relatedto.BMCServiceDesk__incidentDescription__c}</td> 
</tr>

<tr>
<td class = "left"><b>Category</b></td>
<td class = "right">{!relatedto.BMCServiceDesk__FKCategory__r.name}</td> 
</tr>

<tr>
<td class = "left"><b>Service</b></td>
<td class = "right">{!relatedto.BMCServiceDesk__FKBusinessService__r.name}</td> 
</tr>

<tr>
<td class = "left"><b>Service Offering</b></td>
<td class = "right">{!relatedto.BMCServiceDesk__FKServiceOffering__r.name}</td> 
</tr>

<tr>
<td class = "left"><b>Incident Opened Date and Time&nbsp;&nbsp;</b></td>
<td class = "right"><apex:outputText value="{0,date,EEEE, MMMMM dd, yyyy 'at' HH:mm:ss z}"><apex:param value="{!relatedto.BMCServiceDesk__openDateTime__c + 0.041666666 }" /></apex:outputText></td> 
</tr>

<tr>
<td class = "left"><b>Incident Assigned to</b></td>
<td class = "right">{!relatedto.BMCServiceDesk__Additional_email_information__C}</td> 
</tr>

<tr>
<td class = "left"><b>Incident Number</b></td>
<td class = "right">{!relatedto.Name}</td> 
</tr>

<tr>
 <var="ih" value="{!relatedTo.BMCServiceDesk__Incident_Histories__r}">
<td class = "left"><b>Impact Analysis</b></td>
<td class = "right">{!ih.BMCServiceDesk__note__c}</td> 
</v>
</tr>

</table>
<p>
The IT Service Desk will provide an update on how the resolution of this P1 Incident is progresing in the next 30 minutes
</p>
<p>
<p>
</p>
<br></br>
<b>Regards,<br></br>
IT Service Desk</b>
</p>
<p>
<b>If replying to this email notification please do not change the subject line </b>
</p>
</body>
</html>

</messaging:htmlEmailBody>
</messaging:emailTemplate
Best Answer chosen by Coral Racing
AshwaniAshwani
You should replace line 84 with:

<apex:variable var="ih" value="{!relatedTo.BMCServiceDesk__Incident_Histories__r}"/>



Remove "</v> from line 87. 

All Answers

AshwaniAshwani
You should replace line 84 with:

<apex:variable var="ih" value="{!relatedTo.BMCServiceDesk__Incident_Histories__r}"/>



Remove "</v> from line 87. 
This was selected as the best answer
Coral RacingCoral Racing
Thanks for your help.  However I am now getting this error message "Error occurred trying to load the template for preview: Unknown property 'VisualforceArrayList.BMCServiceDesk__note__c'. Please try editing your markup to correct the problem" and unsure as to why? Any ideas? Thanks, Sonya

User-added image



elpaso750elpaso750
Hi,  where you able to solve this?
I'm having the same issue

thanks,
Alex