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
.cmp
<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/>
</aura:iteration>
</aura:component>
.js
({
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){
component.set("v.commentList",data.getReturnValue());
});
$A.enqueueAction(action);
}
})
apex class
public class mevLCaseComment {
@AuraEnabled
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];
}
}