SHARE
TWEET

Untitled

a guest Jul 23rd, 2019 63 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <aura:component controller="mevLCaseComment" implements="flexipage:availableForRecordHome,force:hasRecordId" access="global" >
  2.     <aura:attribute name="commentList" type="casecomment[]" />
  3.     <aura:handler name="init" value="{!this}" action="{!c.doInit}" />  
  4.     <aura:iteration items="{!v.commentList}" var="cc" >
  5.         {!cc.Id} - {!cc.commentbody} <br/>
  6.     </aura:iteration>
  7. </aura:component>
  8.      
  9. ({
  10.    doInit : function(component, event, helper) {
  11.      var action = component.get("c.getCaseComments");
  12.      var rcid = component.get("v.recordId");
  13.      action.setParams({ "ccid" : rcid });      
  14.      action.setCallback(this, function(data){
  15.        component.set("v.commentList",data.getReturnValue());
  16.      });      
  17.      $A.enqueueAction(action);
  18.    }
  19. })
  20.      
  21. public class mevLCaseComment {
  22.     @AuraEnabled
  23.     public static list<casecomment> getCaseComments(id ccid) {
  24.         system.debug(logginglevel.info, 'MEVION DEBUG: case id ' + ccid);
  25.         return [Select Id, commentbody From casecomment Where parentid = :ccid];
  26.     }
  27. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top