How to –Upload files to File Column / Attribute in SSIS from Azure Blog Storage – KingswaySoft (Dynamics 365 / CRM)


Below are a few ways we can upload files to the File Column type field using KingswaySoft’ s Integration Toolkit and Premium Flat File Source and Premium Derived column which are part of the SSIS Productivity Pack of KingswaySoft

https://nishantrana.me/2022/03/17/how-to-upload-files-from-file-column-attribute-using-ssis-kingswaysoft-dynamics-365-crm/

Using the Import columnhttps://nishantrana.me/2022/08/10/how-to-upload-files-to-file-column-attribute-using-ssis-kingswaysoft-and-import-column-dynamics-365-crm/

Using the Script Componenthttps://nishantrana.me/2022/08/09/how-to-use-script-component-to-upload-files-to-file-column-attribute-in-ssis-kingswaysoft-dynamics-365-crm/

Here instead of uploading the files from the local drive, we will be uploading the files stored in the Azure Blob Storage to the corresponding contact records inside CRM.

Below is our Blob Container – here to make things simple we have the mobile number of the contact records used as the pdf file name uploaded, and which will be used for updating the contact records.

The contact records in CRM

Below is how our package looks like

Here we have specified the Item Selection Mode as Recursive (File Only) to make sure it picks the files only and not the folder.

Within the Derived Column, we are replacing the pdf extension from the file name i.e. mobile number, and using it to find the contact records and update them.

Finally, in the CDS / CRM Destination Component, we are performing an upsert using the dervied Mobile Phone Formatted derived column as a match.

The mapping –

Let us now run the package.

Let us now open the records and check.

As expected we can see the file uploaded.

Thanks to Venkata for this solution https://www.linkedin.com/in/venkata-satya-kumar-nagumalli-77923972

Also, check out –

To extract attachments from notes-https://nishantrana.me/2021/02/10/extracting-attachments-from-notes-in-dynamics-365-dataverse/

To download files using Download Block Requesthttps://nishantrana.me/2022/03/14/how-to-download-file-from-file-column-using-initializefileblocksdownload-and-downloadblock-request-dynamics-365-crm-dataverse/

To upload files using Upload Block Requesthttps://nishantrana.me/2022/03/15/how-to-upload-file-to-file-column-using-initializefileblocksupload-and-uploadblock-request-dynamics-365-crm/

Understand File and Image Data Typehttps://nishantrana.me/2021/10/01/using-file-and-image-data-type-in-dataverse-dynamics-365/

Try out the wonderful, feature-rich, and powerful SSIS Integration Toolkit for Dynamics 365 by KingswaySofthttps://www.kingswaysoft.com/products/ssis-integration-toolkit-for-microsoft-dynamics-365/download

Check other articles on SSIS plus CRM – https://nishantrana.me/2018/11/26/ssis-and-microsoft-dynamics-365/

Hope it helps..

Advertisements
Advertisement

How to – Use Import Column to Upload files to File Column / Attribute in SSIS KingswaySoft(Dynamics 365 / CRM)


A few weeks back had posted on how to upload files to the File Column type field using KingswaySoft’ s Integration Toolkit and Premium Flat File Source and Premium Derived column which are part of the SSIS Productivity Pack of KingswaySoft

https://nishantrana.me/2022/03/17/how-to-upload-files-from-file-column-attribute-using-ssis-kingswaysoft-dynamics-365-crm/

Here we will see an example of achieving the same without using the KingswaySoft Productivity Pack’s Premium Flat File Source and Derived column. (although would recommend using it as it includes over 300 premium components making it easier to rapidly build efficient solutions)

https://www.kingswaysoft.com/products/ssis-productivity-pack

Below is our source file

The contact records in CRM

Below is how the package looks like

The Flat File Source points to the location where we have the source csv file containing email, file path, and file name.

Import Column takes the File Path as the Input.

For the Input and Output properties, add an output column (BinaryColumn) of DataType = image.

In the FilePath input column properties, specify the column id of the output column.

Finally, in the CDS / CRM Destination Component, we are performing an upsert using the Email id as a match.

Here we have mapped the output column of the Import Column i.e. BinaryColumn to the binary content field of the file type attribute of the CRM.

Let us now run the package.

Let us now open the records and check.

As expected we can see the file uploaded.

Also, check out –

To extract attachments from notes-https://nishantrana.me/2021/02/10/extracting-attachments-from-notes-in-dynamics-365-dataverse/

To download files using Download Block Requesthttps://nishantrana.me/2022/03/14/how-to-download-file-from-file-column-using-initializefileblocksdownload-and-downloadblock-request-dynamics-365-crm-dataverse/

To upload files using Upload Block Requesthttps://nishantrana.me/2022/03/15/how-to-upload-file-to-file-column-using-initializefileblocksupload-and-uploadblock-request-dynamics-365-crm/

Understand File and Image Data Typehttps://nishantrana.me/2021/10/01/using-file-and-image-data-type-in-dataverse-dynamics-365/

Try out the wonderful, feature-rich, and powerful SSIS Integration Toolkit for Dynamics 365 by KingswaySofthttps://www.kingswaysoft.com/products/ssis-integration-toolkit-for-microsoft-dynamics-365/download

Check other articles on SSIS plus CRM – https://nishantrana.me/2018/11/26/ssis-and-microsoft-dynamics-365/

Hope it helps..

Advertisements

How to – Use Script Component to Upload files to File Column / Attribute in SSIS – KingswaySoft (Dynamics 365 / CRM)


A few weeks back had posted on how to upload files to the File Column type field using KingswaySoft’ s Integration Toolkit and Premium Flat File Source and Premium Derived column which are part of the SSIS Productivity Pack of KingswaySoft

https://nishantrana.me/2022/03/17/how-to-upload-files-from-file-column-attribute-using-ssis-kingswaysoft-dynamics-365-crm/

Here we will see an example of achieving the same without using the KingswaySoft Productivity Pack’s Premium Flat File Source and Derived column. (although would recommend using it as it includes over 300 premium components making it easier to rapidly build efficient solutions for different scenarios)

https://www.kingswaysoft.com/products/ssis-productivity-pack

Here we will be using Script Component to read the file from the path and convert it to DT_IMAGE.

Below is our source file

The contact records in CRM

Below is how the package looks like

The Flat File Source points to the location where we have the source CSV file containing email, file path, and file name.

Script Component has File Path and File Name as the input.


Add a column using Add Column in the Output Columns, with Data Type as image [DT_IMAGE]


Click on Edit Script..

Add the below code to read the bytes from the file path and add it to the output column.

Finally, in the CDS / CRM Destination Component, we are performing an upsert using the Email id as a match.

Here we have mapped the output column of the Import Column i.e. DerviedFileContent to the binary content field of the file type attribute of the CRM.

Let us now run the package.

Let us now open the records and check.

As expected we can see the file uploaded.

Also, check out –

To extract attachments from notes-https://nishantrana.me/2021/02/10/extracting-attachments-from-notes-in-dynamics-365-dataverse/

To download files using Download Block Requesthttps://nishantrana.me/2022/03/14/how-to-download-file-from-file-column-using-initializefileblocksdownload-and-downloadblock-request-dynamics-365-crm-dataverse/

To upload files using Upload Block Requesthttps://nishantrana.me/2022/03/15/how-to-upload-file-to-file-column-using-initializefileblocksupload-and-uploadblock-request-dynamics-365-crm/

Understand File and Image Data Typehttps://nishantrana.me/2021/10/01/using-file-and-image-data-type-in-dataverse-dynamics-365/

Try out the wonderful, feature-rich, and powerful SSIS Integration Toolkit for Dynamics 365 by KingswaySofthttps://www.kingswaysoft.com/products/ssis-integration-toolkit-for-microsoft-dynamics-365/download

Check other articles on SSIS plus CRM – https://nishantrana.me/2018/11/26/ssis-and-microsoft-dynamics-365/

Hope it helps..

Advertisements

How to – Upload files to File Column / Attribute using SSIS – KingswaySoft (Dynamics 365/ CRM)


Let us take a simple example to understand how we can upload files to the file column through SSIS Package + KingswaySoft’s Integration Toolkit.

Here we have a File Column defined for the Contact Entity.

This is what our final package looks like –

Our SSIS package will pick up the contact’s email, file path, and file name from the CSV file as the source using the Premium Flat File Source component.

The premium derived component adds a new column that reads / stores the binary content of the file specified in excel.

Finally, in CDS Destination we are doing Upsert on contact entity based on the email id field specified in the source excel file.

The mapping –

On running the package, we can see the file uploaded to the corresponding contact records.

To extract attachment from notes-https://nishantrana.me/2021/02/10/extracting-attachments-from-notes-in-dynamics-365-dataverse/

To download files using Download Block Request –https://nishantrana.me/2022/03/14/how-to-download-file-from-file-column-using-initializefileblocksdownload-and-downloadblock-request-dynamics-365-crm-dataverse/

To upload files using Upload Block Request –https://nishantrana.me/2022/03/15/how-to-upload-file-to-file-column-using-initializefileblocksupload-and-uploadblock-request-dynamics-365-crm/

Understand File and Image Data Type –https://nishantrana.me/2021/10/01/using-file-and-image-data-type-in-dataverse-dynamics-365/

Try out the wonderful, feature-rich, and powerful SSIS Integration Toolkit for Dynamics 365 by KingswaySoft –https://www.kingswaysoft.com/products/ssis-integration-toolkit-for-microsoft-dynamics-365/download

Check other articles on SSIS plus CRM – https://nishantrana.me/2018/11/26/ssis-and-microsoft-dynamics-365/

Hope it helps..

Advertisements

How to – Download files from File Column / Attribute using SSIS – KingswaySoft (Dynamics 365/ CRM)


Let us take a simple example to understand how we can download files from the file column using SSIS Package + KingswaySoft’s Integration Toolkit.

Here we have a File Column defined for Contact Entity.

Our SSIS package will run on all the contact records and will extract the file from the records to one of the folders in the local machine.

This is what our package’s data flow looks like.

It has just 2 components CDS Source and Premium Derived Column.

CDS Source is connected to the Contact entity.

For Columns, we have selected our file column fields.

Next, we have next added a Primary Derived Column component.

We have used the WriteBinaryComponent function to write the binary content (new_myfile_binarycontent field) to a file.

WriteBinaryContent(“D:\\MyDownloadedFile\\”+[new_myfile_name], new_myfile_binarycontent])

On running the package successfully, we can see the files downloaded at the folder specified.

The result – as we just had 2 contact records out of 106 having file uploaded to it we can see those 2 filed downloaded.

Hope it helps..

Advertisements

Use ExecuteWorkflowAction to call Action and Workflow in CDS Destination KingswaySoft – Dynamics 365 / Dataverse


We can use ExecuteWorkflowAction in the CDS/CRM Destination Component of KingswaySoft’s SSIS Integration Toolkit for Dynamics 365 to execute workflow and custom action.

If there is no Destination Entity defined (left blank), Workflow/Action options will list down all the global action available


On selecting a specific entity/table e.g. lead entity, it is listing down the actions tied to the lead entity and the on-demand workflows created for the lead.

Here new_TestLeadAction is a custom action and Test Lead Workflow On-Demand is an On-Demand Workflow.


Suppose we have the following input and output parameters defined in the custom action.


Within the CRM Destination Component, we can see the input fields listed for mapping along with the LeadId field where it expects the GUID of the lead record to be passed, against which action has to be executed.


Let us create a custom Global Action – Test Global Action and see if it is listed there or not.


We can see the custom global action listed when there is no destination entity selected as we saw earlier.

However, we also get the error that the Entity as input argument is not supported.


We get the same error for the input parameter of type Entity Collection.


For Entity Reference input it works properly and expects Entity Ref and Entity Ref Type to be passed.

We have removed the input parameter of type Entity and Entity Collection and added an output parameter named SampleOutput.

Surprisingly within our SSIS package, we could not figure out to get the output parameter’s value back from the Action.


We asked KingswaySoft Technical Support (support@kingswaysoft.com), and as usual, within a couple of hours the experts there were able to confirm our understanding that output parameters are not supported in the CDS Destination component for now.

Check other posts on KingswaySoft and Dynamics 365 / CRM https://nishantrana.me/2020/10/16/ssis-kingswaysoft-and-dynamics-365/

Hope it helps.

Advertisements
%d bloggers like this: