Advertisement
Guest User

Untitled

a guest
Jul 23rd, 2019
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.04 KB | None | 0 0
  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. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement