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
Priyadarshini Manoharan 3Priyadarshini Manoharan 3 

How to access grand child object FeedComments in Visualforce email template for relatedToType = Case

I have a Visualforce email template with recipient type as User and
relatedtoType as case. I am able to access Chatter Post in email as below. However I am not able to access the Chatter FeedComment in the email template as it is based on a different object which is a child of CaseFeed. What is the relatedTo value for FeedComments on the Case object for Visualforce email templates or how do I access grand child object FeedComments in Visualforce email template for relatedToType = Case
</table>



<h1 style="font-size:100%">Case Feed:</h1>

<table border="1">
<tr>
<th> Date/Time </th>
<th> Created By </th>
<th> Chatter Post </th>


</tr>



<apex:repeat var="cx" value="{!relatedTo.Feeds}">
               
<tr>
<td>{!cx.CreatedDate} </td>
<td>{!cx.CreatedBy.Name}</td>
<td>{!cx.Body}</td>


</tr>

</apex:repeat>
</table>