In order to migrate attachments from Salesforce to Dynamics 365, we could use Kingswaysoft without writing any code through the Developer version.

Kingswaysoft has a premium Derived column tool available that decodes the Attachment encoded string from and migrates it to Dynamics 365. The license needs to be obtained only to use the SSIS package in production as a scheduled job or through the command line tool.

The process is explained as below:

  1. Download the Kingswaysoft Productivity tools here.
  2. Once it is installed, reopen the Visual studio and the Premium tools should appear in the SSIS toolbox as below.


  1. Drag and drop the Premium Derived Column to the DataFlow.
  2. Use the DecodeBase64 function and use the field where the attachment is stored. In the below case, it is the field Body from


  1. Make sure the DataType is DT_Image, which will be automatically populated.
  2. Run the SSIS package after mapping the column with the documentbody field in Annotation entity in Dynamics 365.
  3. Verify by opening the document/pdf from the associated entity (example case or opportunity or quote). The PDF will open in CRM with the same contents as in

Voila! You’ve migrated your attachments Dynamics 365!

Happy Dynamics 365’ing!

Avatar for Joe D365

Joe D365

Joe D365 is a Microsoft Dynamics 365 superhero who runs on pure Dynamics adrenaline. As the face of PowerObjects, Joe D365’s mission is to reveal innovative ways to use Dynamics 365 and bring the application to more businesses and organizations around the world.