JDBC Driver for Act! CRM

Build 26.0.9770

DownloadAttachment

Download an attachment from an Act! CRM entity.

Stored Procedures Specific Information

Process of downloading attachment

This stored procedure downloads an attachment from an Act! CRM entity. The required parameters EntityType (accepts a single value: 'activities', 'documents', 'history', or 'notes') and EntityId (accepts a single value) identify the entity. The optional parameter LocalPath accepts a full file path to write to an exact location. If LocalPath is omitted, the optional FileStream parameter can be used to write the file data directly to an output stream; otherwise the file content is returned as Base64 in the FileData output column. For example:

Return file content as Base64

EXEC DownloadAttachment EntityType = 'notes', EntityId = '683fde56-eec0-4f13-aa51-40ff890f151d';

Write file to a local path

EXEC DownloadAttachment EntityType = 'notes', EntityId = '683fde56-eec0-4f13-aa51-40ff890f151d', LocalPath = 'D:/Logs/test.png';

Write file to an output stream

EXEC DownloadAttachment EntityType = 'notes', EntityId = '683fde56-eec0-4f13-aa51-40ff890f151d', FileStream = @outputStream;

Input

Name Type Accepts Output Streams Description
EntityType String False The type of entity the attachment belongs to.

The allowed values are activities, documents, history, notes.

EntityId String False The unique identifier of the entity.
LocalPath String False The local path to write the downloaded file to. A full file path to write to an exact location. If not specified, the file data is returned as Base64.
FileStream String True An output stream to write the file data to. Used when LocalPath is not specified.

Result Set Columns

Name Type Description
FileData String The Base64-encoded file content. Populated when LocalPath and FileStream are not provided.
LocalPath String The resolved local file path where the attachment was saved. Populated when LocalPath is provided as input.
Status String Stored Procedure Execution Status

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