I have a component that will live on a case page where I want to show case comments and make an easy way for them to toggle them between public and private in lightning. However it retrieves the info but will not render any information on the page except for the case comment id. I know it's retrieving the records because it shows a line with id for every comment but will not render the commentbody or any other field from the object What am I doing wrong


<aura:component controller="mevLCaseComment" implements="flexipage:availableForRecordHome,force:hasRecordId" access="global" >
    <aura:attribute name="commentList" type="casecomment[]" />
    <aura:handler name="init" value="{!this}" action="{!c.doInit}" />   
    <aura:iteration items="{!v.commentList}" var="cc" >
        {!cc.Id} - {!cc.commentbody} <br/>


   doInit : function(component, event, helper) {
     var action = component.get("c.getCaseComments");
     var rcid = component.get("v.recordId");
     action.setParams({ "ccid" : rcid });       
     action.setCallback(this, function(data){

apex class

public class mevLCaseComment {
    public static list<casecomment> getCaseComments(id ccid) {
        system.debug(logginglevel.info, 'MEVION DEBUG: case id ' + ccid);
        return [Select Id, commentbody From casecomment Where parentid = :ccid]; 

1 Answer 1


Lightning is case sensitive.

{!cc.Id} - {!cc.commentbody}

Here, API name of commentbody is CommentBody

{!cc.Id} - {!cc.CommentBody}

This should work


You must log in to answer this question.

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