Advertisement
Guest User

Untitled

a guest
Feb 20th, 2019
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.71 KB | None | 0 0
  1. <apex:page standardController="Grievance__c" extensions="MrcCaseListController" recordSetVar="notes" sidebar="false" >
  2. <apex:pageBlock >
  3. <apex:pageBlockTable value="{!notes}" var="n">
  4. <apex:column headerValue="Case Note" value="{!n.Note__c}" style="width: 76%; padding:10px;vertical-align:top;" />
  5.  
  6. <apex:column value="{!n.Contact_Date__c}" style="width: 6%; padding:10px; vertical-align:top;"/>
  7.  
  8. <apex:column value="{!n.Contact_Type__c}" style="width: 6%; padding:10px; vertical-align:top;"/>
  9.  
  10. <apex:column value="{!n.CreatedById}" style="width: 6%; padding:10px; vertical-align:top;"/>
  11. <apex:column style="width: 6%; padding:10px;vertical-align:top;">
  12. <apex:outputLink value="/{!n.id}" target="_blank">
  13. {!n.Note_Created_Date_Time__c}
  14. </apex:outputLink>
  15. </apex:column>
  16. </apex:pageBlockTable>
  17. </apex:pageBlock>
  18.  
  19. </apex:page>
  20.  
  21. public with sharing class MrcCaseListController {
  22.  
  23. public List<Grievance_Note__c> notes{get;set;}
  24. public Grievance__c mrcCase {get;set;}
  25.  
  26. public MrcCaseListController(ApexPages.StandardController controller) {
  27.  
  28. mrcCase = (Grievance__c)controller.getRecord();
  29.  
  30. List <Grievance__c> mrcCaseList = [SELECT id FROM Grievance__c WHERE id =: mrcCase.id LIMIT 1];
  31.  
  32. notes = [SELECT id,Note__c,Note_Created_Date_Time__c,Contact_Date__c,Grievance__c,Contact_Type__c,CreatedById,LastModifiedById
  33. FROM Grievance_Note__c
  34. WHERE Grievance__c = :mrcCase.id
  35. ORDER BY Note_Created_Date_Time__c];
  36.  
  37. }
  38.  
  39. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement