Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <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>
- ({
- 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);
- }
- })
- 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];
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement