# Get Connected Folder

Retrieve folder-type attachments (such as the connected Parent folder) for a Salesforce record from Apex.

> Kind: Apex method · Updated: 2026-07-01

## Signature

```apex
global static List<List<Attachment>> listAttachments(
  List<String> parentIds,
  String runAs
)
```

### Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| parentIds | List&lt;String&gt; | required | List of Salesforce RecordIds. |
| runAs | String | required | Email Id of the user on whom behalf the function should run. If you want to run the action as automation user, supply integrationUser. |

## Return Type

List<List<Attachment&gt;&gt;

## Example

```apex
List<List<cldfs.Attachment>> attachments = new List<List<cldfs.Attachment>>();
attachments = cldfs.Client.listAttachments(new List<String>{'001dL00000ZJIYiQAP'}, 'integrationUser');
```

> **Same method as Get Attachments** — This uses the same underlying cldfs.Client.listAttachments as Get Attachments; the two are documented as separate pages for their distinct use cases.
