ADO.NET Provider for SugarCRM

Build 25.0.9539

DownloadFile

Downloads a file that is stored in SugarCRM document storage. This stored procedure supports integration workflows and external document access.

Input

Name Type Accepts Output Streams Description
ResourceId String False The unique Identifier (Id) of the resource that contains the file. This value determines which resource record the stored procedure retrieves the file from.
Module String False The name of the SugarCRM module that contains the resource. This value determines where the stored procedure looks for the file (for example, 'Documents').

The default value is Documents.

Field String False The name of the field within the specified module that stores the file reference (for example, 'filename'). This value determines which field's stored file content is retrieved.

The default value is filename.

OutputFolder String False The full path to the folder where the downloaded file is written. This parameter is used when the file is intended to be saved to a local directory.
FileStream String True The stored procedure input parameter that specifies an output stream object that receives the downloaded file data. This parameter is used only when the OutputFolder parameter is not provided. This parameter supports writing to in-memory buffers or external destinations.

Result Set Columns

Name Type Description
Status String The execution status returned by the stored procedure. This value indicates whether the download operation completed successfully or encountered an error.
FileName String The name of the file that is downloaded when the response includes file metadata. This value is useful for determining the output file's name when saving to a stream or when the name is not known in advance.
FileData String The file data that is returned as a Base64-encoded string when neither the OutputFolder parameter nor the FileStream parameter is provided. This output allows retrieval of file content directly for programmatic handling.

Copyright (c) 2026 CData Software, Inc. - All rights reserved.
Build 25.0.9539