Dynamics 365 Attachment Management with Azure Blob Storage

Dynamics 365 Out of the Box Notes. (which allows you to attach file along with a Note)

Today what we are going to look at is another solution with the help of Azure Blob Storage.

What is Azure Blob Storage ?

Azure Blobis a cloud based storage solution provided by Microsoft Azure that can be used to store and retrieve Binary Large Objects (BLOBs) also known as files. Azure Blob allows users/organizations to expose their unstructured data to customers anywhere through REST-based object storage.

Recently Microsoft Labs released a Dynamics 365 solution that allows user to store and retrieve attachments from Dynamics 365 to Azure Blob. The solution is called “Attachment Management” and it can be found in the D365 Marketing Place. Today we are going to look at this solution and explore what are the pros and cons of it .

This solution is provided by Microsoft Labs and it is NOT officially supported by MS. However, it is in Microsoft’s road map to provide a supported solution in the future. So where should you use this solution and what is its purpose. The purpose is to show the possibility of an alternate storage platform for Dynamics 365 and this solution should be used for evaluation purposes or pre-sales purposes to show your customers the capabilities of the Azure Blob Storage. Again, this solution should NOTbe used in a Production instance as this is not officially supported. It should only be used in a Non-Production instance such Dev or a Test.

Installing the solution

Create an Azure Bob Storage Account and the Containers

Install the solution from Dynamics Market Place

Configure the Azure Blob Storage Settings entity in Dynamics 365 with the Blob Storage Account details created in step “1”

Add the Web Resources to the desired Entity to provide the UI to upload and view files

Creating an Azure Bob Storage Account and the Containers

In this article, we are not going to cover on how to create a Blob Storage Account. Please refer to this link which will provide a very details overview on the creation process. Once you have the Blob Account created. You need to create two containers for Email Attachments and another for Note attachments. To do this

Navigate to the Azure Blob Storage account via the Azure Portal and Click on the “+” icon that says “Container”. Provide a Name and set the Access Type to “Blob” and click “OK”

Install the solution from Dynamics Market Place

Login to Dynamics 365 and Navigate to Settings -> Dynamics Market Place

Search for “Attachment Management” click on the “Get It Now” button to install the solution.

Select the Instance where the solution should install.

Configure the Azure Blob Storage Settings in Dynamics 365

Open Microsoft Dynamics 365

Navigate to Settings -> Extensions -> Azure Blob Storage Settings

Create a New Record.

If entity isn’t visible on the Setting Menu. Search for the “Azure Blob Storage Settings” entity via Advance Search and create a new Record.

Complete the Fields as below

Name: Name of the Azure Blob Storage Account

Account Key : Blob Storage Account key(Copy from one of the two keys)

Notes Attachment Container : Email Container Name

Email Attachment Container: Note Container Name

Adding Web Resources to enable the UI

In this step, we are going to create a UI from which the end users will upload and retrieve the attachments. To do this we must first select the Entity that we desire to add this feature e.g. Account , Contact or any entity.

There are two web resources that is needed for the UI as below

html – User to View the uploaded attachments, this web resource will list all the notes and email attachments in grid format. User can delete and download single /multiple files from the grid.

html – This web resource contains the code to upload multiple files.

Navigate to Form Customizations and add a Web Resources to the Form (you can create a separate TAB).

Once you complete the above step Publish All Customisations.

Refresh the Form and you should get an UI like the below image. Using this Interface users can now upload and view all attachments that are stored in Azure Blob.

In Azure Blob end, when files are uploaded they will appear in the respective containers as below

Why Azure Blob?

Now that we have installed and played with the solution, let’s look at why should we consider Blob storage for Dynamics 365

The Price: Just to put things to context . The cost of a blob storage for 10GB per month is $0.21

If you compare that to CRM Storage and SharePoint storage cost it is as below

Follow me on Twitter

About This Blog

I am a Dynamics CRM Consultant based in Melbourne. I started my CRM journey with Dynamics CRM 3.0 and have worked in various CRM implementation across many industries. I have dedicated this blog to write about all D365 related tips and tricks I come across in my consulting career. If you there is any D365 related query , I will be more than happy to help and I can be contact via the above details.

Subscribe to Blog via Email

Enter your email address to subscribe to this blog and receive notifications of new posts by email.