Working with Salesforce Attachments

Working with Salesforce Attachments


SSIS Data Flow Components for Salesforce can be used to download and upload Salesforce attachments. To work with documents (binary files), the ContentVersion object is required. The binary data of each document is stored in the VersionData field.

Example: Transferring Salesforce Attachments to SQL Server

SQL Server table

CREATE TABLE dgm.dbo.SF_DOCS (
      id INT IDENTITY
      ,sfid VARCHAR(50) NULL
      ,title VARCHAR(500) NULL
      ,data VARBINARY(MAX) NULL
      ,CONSTRAINT PK_SF_DOCS_id PRIMARY KEY CLUSTERED (id)
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO

Data Flow Task:


Devart Salesforce Source:



ADO.NET Destination (Mappings): 



Result:



The document was successfully uploaded to the SQL Server table.
    • Related Articles

    • Cannot Open Table ‘Case’ and ‘Order’ in SSMS with ODBC Driver for Salesforce

      When working with SQL Server Management Studio (SSMS) and the Devart ODBC Driver for Salesforce, you may encounter difficulties accessing certain tables such as Case or Order. Important Note on SSMS Behavior Queries in SSMS are first processed by SQL ...
    • Configuring OAuth 2.0 Authentication in Salesforce

      OAuth 2.0 (Open Authorization 2.0) is an open standard for access delegation, commonly used to grant third-party applications limited access to a user’s resources without exposing their credentials. It allows secure access to a resource on behalf of ...
    • ODBC Drivers: Recommendations for Working with MS Access

      When connecting to external ODBC data sources in Microsoft Access, it’s important to understand the performance differences between pass-through queries and linked tables. Pass-Through Queries Pass-through queries execute on the server, returning ...
    • Excel Add-ins. Slow Data Extraction (Cloud Providers)

      This article is for Excel Add-ins (Clouds). Navigation: Supported Data Sources → Supported cloud applications: When working with Excel Add-ins connected to cloud sources such as Salesforce or QuickBooks, data loading may be noticeably slower than ...
    • Setting up a Connection to ODBC in Delphi Using Devart ODBC Driver

      This guide will walk you through the steps of setting up a connection to an ODBC driver in Delphi. We'll use ODBC Driver for Salesforce as an example. Prerequisites: Devart ODBC Driver for Salesforce installed on your machine. A Salesforce account ...