0

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">
      <messaging:htmlEmailBody>



      <html>

     <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- 
     height:107%;font-size:15px;font-family:"Calibri",sans-serif;'><br></br></p>

     <table border="1">

       <tr>
           <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>

      </tr>

      <tr>
         <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>


     </tr>

   </table>

 <p><br></br></p>
 <p><br></br></p>
 <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 
     email</span></p>

 </html>

   <messaging:plainTextEmailBody>
 </messaging:plainTextEmailBody>

 </messaging:htmlEmailBody>
 </messaging:emailTemplate>
4
  • Please provide the apex side of the component.
    – gNerb
    Commented May 29, 2020 at 14:40
  • NO Apex has been created yet.
    – Hedge-Hog
    Commented May 29, 2020 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
    Commented May 29, 2020 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
    Commented May 29, 2020 at 15:38

1 Answer 1

4

I believe you are supposed to use relatedTo instead of case

<td> {!RelatedTo.Complaints_Pega_Case_Ref__c} </td>
3
  • got the same error
    – Hedge-Hog
    Commented May 29, 2020 at 15:11
  • 2
    Did you replace it everywhere?
    – kurunve
    Commented May 29, 2020 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
    Commented May 29, 2020 at 15:25

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .