I am firstly creating a VF Email Template, a table below, then after WILL create a batch class to include NOT completed Tasks and case numbers in the email with specific criteria and I am getting the error.

I have commented the formula and the lookup field to isolate the issue on my VF email template however I am still getting this error Error: Unknown property 'core.email.template.EmailTemplateComponentController.Case'

I have checked for similar issue but none found. I already checked that there is no controller for Email Template yet that has been created.

      <messaging:emailTemplate subject="ABCA Task Due in 1 Week" recipientType="User" relatedToType="Case">


     <p style='margin-top:0cm;margin-right:0cm;margin-bottom:8.0pt;margin-left:0cm;line- 
     height:107%;font-size:15px;font-family:"Calibri",sans-serif;'><span style='font-size:14px;line- 
     height:107%;font-family:"Segoe UI",sans-serif;color:#172B4D;background:white;'>The below ABCA 
     Tasks are due in 1 week:</span></p>
     <p style='margin-top:0cm;margin-right:0cm;margin-bottom:8.0pt;margin-left:0cm;line- 

     <table border="1">

           <td> SF Case Ref  </td>
           <td> Case Subject </td>
           <td> Case Manager </td>
           <td>  Client Name </td>
           <td> Sub Product </td>
           <td> Task Subject </td>
           <td> Due Date </td>
           <td> Pega Ref </td>


         <td> {!Case.CaseNumber}          </td>
         <td> {!Case.Subject}             </td>
         <td> <!--{!Case.Case_Owner_Name__c }  -->             </td>
         <td> <!--{!relatedTo.ContactId.name__r}  -->         </td> 
         <td> {!Case.Sub_Product}        </td>
         <td> {!Task.Subject}            </td>
         <td> {!Task.ActivityDate}       </td>
         <td> {!Case.Complaints_Pega_Case_Ref__c} </td>



 <p style='margin-top:0cm;margin-right:0cm;margin-bottom:8.0pt;margin-left:0cm;line-height:107%;font- 
     size:15px;font-family:"Calibri",sans-serif;'><span style='font-size:14px;line-height:107%;font- 
     family:"Segoe UI",sans-serif;color:#172B4D;background:white;'>Note: this is an automated 



  • Please provide the apex side of the component. – gNerb May 29 '20 at 14:40
  • NO Apex has been created yet. – Hedge-Hog May 29 '20 at 14:41
  • This is probably minor or unrelated, but it looks like the messaging:plainTextEmailBody opening tag is missing a < and you shouldn't nest the plaintext content inside the HTML content tags. – nbrown May 29 '20 at 15:31
  • Oh, thanks for noticing it maybe I just deleted it when doing a manual tab. I have checked that there is an opening tag on the actual VF code in my sandbox. I have edited the above. – Hedge-Hog May 29 '20 at 15:38

I believe you are supposed to use relatedTo instead of case

<td> {!RelatedTo.Complaints_Pega_Case_Ref__c} </td>
  • got the same error – Hedge-Hog May 29 '20 at 15:11
  • 2
    Did you replace it everywhere? – kurunve May 29 '20 at 15:17
  • I just replaced a while ago to <td> {!RelatedTo.Complaints_Pega_Case_Ref__c} </td> and realized that this is a text field. Complaints_Pega_Case_Ref__c is a text field created inside the case object. – Hedge-Hog May 29 '20 at 15:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.