DownloadFile
Downloads a file that is stored in SugarCRM document storage. This stored procedure supports integration workflows and external document access.
Input
| Name | Type | Description |
| ResourceId | String | 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 | The name of the SugarCRM module that contains the resource. This value determines where the stored procedure looks for the file (for example, 'Documents').
デフォルト値はDocumentsです。 |
| Field | String | 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.
デフォルト値はfilenameです。 |
| OutputFolder | String | 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. |
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. |