When it comes to attaching files to Dynamics 365 Records, we have two options we can take into consideration
- SharePoint via the native Integration from CRM.
- 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 Blob is 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 NOT be 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
|$USD Per GB||1 Year||5 Year|
Azure blob storage is 165 x cheaper than Dynamics CRM and 3 x cheaper than SharePoint
Some of the drawbacks of Azure Blob in comparison to SharePoint are
- The lack of Version Control and co-author capabilities
- The lack of workflow management.
- The lack of security management.
So where should we use it. If there is a high volume of attachment data that is unstructured and does not require version control , security or co-authoring functions , Azure Blob will save your day.
I hope this article will help you in your day to day consulting work . If there are any questions please feel free to email or comment.