DownloadDocument
Downloads documents from Salesforce for offline access or external use.
Input
| Name | Type | Accepts Output Streams | Description |
| Id | String | False | Salesforce ID of the specific document to download. Required if Name or FolderId is not specified. If none are provided, all documents will be downloaded. |
| Name | String | False | Name of the document to download. Can be used as an alternative to Id or FolderId. If none are provided, all documents will be downloaded. |
| Folderid | String | False | Salesforce ID of the folder containing the documents to download. Useful for downloading all documents within a specific folder. |
| LocalPath | String | False | Path on the local file system where the downloaded file(s) will be saved. If omitted, the file is returned in memory via the FileData output. |
| Encoding | String | False | Text encoding format used when returning file data via FileData. Ignored if the file is written to disk.
The allowed values are NONE, BASE64. The default value is BASE64. |
| FileStream | String | True | Optional output stream to write file data to when LocalPath is not specified. Supports in-memory or streaming download use cases. |
Result Set Columns
| Name | Type | Description |
| FileId | String | Salesforce ID of the downloaded document. |
| Success | String | Indicates whether the download operation succeeded for the specific document (true or false). |
| FileName | String | Name of the file that was downloaded from Salesforce. |
| FullPath | String | Complete local file path, including the file name, where the document was saved. |
| FileData | String | Base64-encoded content of the downloaded file. Only returned when LocalPath is not set and data is kept in memory. |
| FailureMessage | String | If downloading multiple documents, contains error messages for any documents that failed to download. |