APEX Class:

public List getCaseAttachmentList(){
  if(caseId != null && caseId != ”) {
 string attachCaseQry = ‘Select Id, Name, Body, CreatedDate From Attachment where ParentId = \”+caseId+ ‘\”;
 caseAttachmentList = (List)Database.query(attachCaseQry);
 system.debug(‘Attachment Result:’ + caseAttachmentList);
 
  }
  return caseAttachmentList;
}
VisualForce Page:
 
 
Output:
03/30/2012
04/02/2012
04/01/2012

Written by 

Salesforce MVP | Lightning Champion | 17x Salesforce Certified | Application Architect | 7x Trailhead Ranger | Techforce Services | Australia

Leave a Reply

Your email address will not be published. Required fields are marked *

*