Signature

global static List<List<Attachment>> listAttachments(
  List<String> parentIds,
  String runAs
)
Parameters
ParameterDescription
parentIds
List<String>
requiredThe Salesforce record Ids of the records where files/folders are attached.
runAs
String
requiredUsername to attribute the operation to; usually a static value — 'integrationUser'.

Return Type

List<List<Attachment>> — one inner list per parentId, in input order.

Example

List<String> parentIds = new List<String>{
  '001dL00000ZJIYiQAP',
  '0010Y00000B1Q2HQAV'
};

List<List<cldfs.Attachment>> returnedAttachments = cldfs.Client.listAttachments(
  parentIds,
  'integrationUser'
);