November 9, 2020 7:58 AM
Recently we were exploring ways of extracting attachment from notes to a local drive for our case entity. We also wanted to organize it based on Case Number.
For this, we used KingswaySoft’s SSIS components.
Other posts on SSIS and Dynamics 365 –
https://nishantrana.me/2018/11/26/ssis-and-microsoft-dynamics-365/
This is how our final package looked like

For CDS Source, we used Source Type as Fetch XML.
And the below Fetch XML to fetch notes details where objecttypecode is incident and isdocument property are true (i.e. has an attachment) and case as the linked entity to get the case ticket number.

Result View –

CDS / CRM Source Component –

Make sure to use the alias for the attributes of the linked entity.
Next drag the Premium Derived Column, here we will use the DecodeBase64 encoding function to decode the file content stored in the documentbody field using as base-64 encoded string.
DT_Image output column will have the binary content of the attachment

Next, we have added another Premium Derived Column, this time to write the binary content to the local drive, using the WriteBinaryContent function.

Click on the ellipsis to specify the expression.

Here we are creating a folder based on the case ticket number and storing the corresponding attachments inside it.
Let us run the package

On successful execution, we can see the folders created with case ticket number and attachments added to it.





Get all the details here
http://www.kingswaysoft.com/blog/2017/03/21/Extracting-CRM-Attachments-with-Ease
Hope it helps..
Subscribe to get the latest posts sent to your email.
Posted by Nishant Rana
Categories: kingswaysoft, Microsoft Dynamics 365, SSIS
Tags: kingswaysoft, Microsoft Dynamics 365, SSIS
Mobile Site | Full Site
Get a free blog at WordPress.com Theme: WordPress Mobile Edition by Alex King.
[…] Recently we were exploring ways of extracting attachment from notes to a local drive for our case entity. We also wanted to organize it based on Case Number. For this, we used KingswaySoft’s SSIS components. This is how our final package looked like For CDS Source, we used Source Type as Fetch XML. And the … Continue reading “Extract attachment from Notes in Dynamics 365 / CE / CDS –… […]
LikeLike
By Extract attachment from Notes in Dynamics 365 / CE / CDS – SSIS (KingswaySoft) - 365 Community on November 9, 2020 at 11:25 AM
[…] https://nishantrana.me/2020/11/09/extract-attachment-from-notes-in-dynamics-365-ce-cds-ssis-kingsway… […]
LikeLike
By Extracting attachments from Notes in Dynamics 365 / Dataverse – Nishant Rana's Weblog on February 10, 2021 at 8:17 AM
[…] https://nishantrana.me/2020/11/09/extract-attachment-from-notes-in-dynamics-365-ce-cds-ssis-kingsway… […]
LikeLike
By Extracting attachments from Notes in Dynamics 365 / Dataverse ERP for Hong Kong SME on February 10, 2021 at 8:27 AM