ADO.NET Provider for Salesforce

Build 25.0.9434

DownloadContentDocument

Retrieves documents stored in Salesforce Content Library.

Input

Name Type Accepts Output Streams Description
Id String False Salesforce ID of the content document to download. Required if Title is not specified. If both Id and Title are omitted, all available content documents will be downloaded.
Title String False Title of the content document to download. Used as an alternative to Id. If both Title and Id are omitted, all content documents will be downloaded.
LocalPath String False Local directory path where the downloaded file will be saved. If not provided, the file will be held in memory and returned through FileData.
Encoding String False Character encoding used when outputting file data through FileData. Has no effect if the file is saved to disk.

The allowed values are NONE, BASE64.

The default value is BASE64.

FileStream String True Optional output stream to write the downloaded file to, used when LocalPath is not provided. Enables in-memory or streaming use cases.

Result Set Columns

Name Type Description
FileId String Salesforce ID of the content document that was downloaded.
Success String Indicates whether the file download was successful (true) or failed (false).
FileName String Name of the downloaded file as stored in Salesforce.
FullPath String Complete local file path where the file was saved, including the filename.
FileData String Base64-encoded file content, returned only when LocalPath is not provided and file is kept in memory.
FailureMessage String In multi-file download mode, this field includes error details for any files that failed to download.

Copyright (c) 2025 CData Software, Inc. - All rights reserved.
Build 25.0.9434