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.