DownloadFile
Downloads a file that is attached to a specified entity. This stored procedure supports document management by retrieving attachments that users need to review or archive.
Input
| Name | Type | Required | Description |
| EntityType | String | True | Specifies the entity type that is associated with the DownloadFile stored procedure. This input determines which entity's file data the system retrieves during the operation.
The allowed values are Candidate, ClientContact, ClientCorporation, JobOrder, Opportunity, Placement. |
| EntityId | String | True | Specifies the unique identifier (Id) of the entity whose file content is being requested. This input directs the system to locate the correct entity before retrieving the associated file. |
| FileId | String | True | Specifies the Id of the file that the DownloadFile stored procedure retrieves. This input ensures that the system selects the correct file record for download. |
| OutputFolder | String | False | Specifies the folder location that is used by the DownloadFile stored procedure to save the retrieved file. This input directs the system to write the file to the specified path when provided. |
Result Set Columns
| Name | Type | Description |
| FileData | String | Represents the Base64-encoded file content that is returned by the DownloadFile stored procedure when neither OutputFolder input nor FileStream input is provided. This output enables file retrieval directly through the stored procedure response. |
| Success | String | Returns a value of 'true' when the DownloadFile stored procedure completes the file retrieval successfully. It returns a value of 'false' when the system cannot locate, process, or deliver the requested file. |