Skip to main content

Azure Blob Storage For Storing Microsoft Dynamics 365 Attachments

In my Living In SCRIBE Online Blog I talked about work I did to migrate CRM 4.0 on-premise to Dynamics 365 using SCRIBE Online.  In that blog I mentioned how there are about 80 GB worth of attachments that had to be moved into the cloud.  Well this could quickly get expensive if we stored them directly in CRM.  Also, this client wasn't using SharePoint.  So what option do we have to store this data so end users can access the data?  Why not use Azure Blob Storage?

Microsoft has an app in AppSource to move attachments from CRM to Azure blob storage.  Not only does it all for this, but it also has a web resource in it so you can allow for bulk uploads.  Here is how to set it up:

1) Go To AppSource
2) Install the Attachment Management App by clicking the "Get It Now" button under the image.
3) While its installing go to Azure and setup your blob storage account.
4) For each CRM instance you will need to setup 2 containers in your blob storage.  One is for email attachments and the other is for notes attachments.  So if you have a production instance and sandbox instance you will need to have 4 containers (DevEmails, DevNotes, ProdEmails, ProdNotes).
5) Still in Azure click on "Shared Access Signatures"  Here you will setup your SAS key.  Complete all sections and click on "Generate SAS".
6) Copy the SAS key, we will need it later.
7) Go back to CRM and check to make sure the attachment management app finished installing.
8) In setting -> Customization -> Solutions, click on publish all customization.
9) Refresh your screen.
10) You may not see a link anywhere in the navigation to the azure blob storage entity, so you can either turn it on to appear in the settings area or just use advanced find to get to the entity.  It is called Azure Blob Storage Settings.
11) Add a new record.
      - Name = The name of the blob storage account in Azure
      - SAS Token = Get this from step 6
      - Notes Attachment Container = Name of the container in Azure
      - Email Attachment Container = Name of the container in Azure
12) Save

Your attachments in CRM will now be stored in Azure.  You will still be able to access the notes within CRM with no problem at all, including even downloading them from CRM.  One thing to note about this is it will not move attachments that are already in CRM.  So it is best to install this early on if you are not going to use SharePoint integration.

Comments

  1. This comment has been removed by the author.

    ReplyDelete
  2. Hello. If you end up in a situation where some attachments are on D365 storage and some are on Azure, will the attachment be retrieved from wherever it is stored? By setting up Azure blob storage, will it make the attachments stored on D365 storage unavailable?

    Thanks

    Matt

    ReplyDelete
    Replies
    1. When you setup azure blob storage, if there are attachments in CRM you can choose to move them to azure or keep them in CRM. If you choose to keep them in CRM, then you will still be able to access them. During the setup you can migrate existing attachments to azure blob storage. DO NOT move any attachments for the adx_ entities as these are CRM Portal files and will break your portal. Alos don't move any cd_ files as theese are clickdimensions ones.

      Delete
  3. After research a few of the weblog posts in your web site now, and I really like your manner of blogging. I bookmarked it to my bookmark web site record and will probably be checking back soon. Pls take a look at my web site as nicely and let me know what you think. online casino gambling

    ReplyDelete
  4. A very delightful article that you have shared here. Your blog is a valuable and engaging article for us, and also I will share it with my companions who need this info. Thankful to you for sharing an article like this. What is Microsoft Azure

    ReplyDelete

  5. i am really lucky to read this blog. i have got a lot of information from here. it is my good luck that
    i read this blog. thank you very much writer.
    for more information Office 365 Email Signature

    ReplyDelete
  6. NAS has advantages like great perusing and composing execution, great information excess and insurance alternatives, offering security through information encryption, sharing documents, backing up information from Windows, Mac, and conceivably Linux machines and offering some cloud administration for storage and reinforcement. collapsible fish farm tank manufacturer

    ReplyDelete
  7. Excellent work. This post that you have shared is attractive. Really, I was searching for these types of blogs. Thank you for sharing this blog. houston managed it services

    ReplyDelete

Post a Comment

Popular posts from this blog

Dynamics Set IFrame URL - D365 v8 vs. D365 v9

While doing client work, I came across a problem with setting an IFrame URL dynamically.  The underlying issue was that the sandbox instance is on v8 of Dynamics 365 and production is on v9 of Dynamics 365.  The reason for this was because this client was setup around the time that Microsoft rolled out v9.  Anyways, JavaScript that I wrote to dynamically set the URL of the IFrame wasn't working in the v9 instance.  This was because of changes that Microsoft made to how IFrames are loaded on the form and also changes to JavaScript. Here is my v8 setup: JavaScript runs OnLoad of contact form.  This works because of how IFrames are loaded in v8.  You can also run it on either a tab change (hide / show) or OnReadyStateComplete event of the IFrame.  Depending on your setup you will need to choose which is best for you.  For me in this case it was the OnLoad event. Here is the JavaScript: function OnLoad() { //Get memberid var value = Xrm.Page.data.entity.attri

CRM Portals OnChange Event For DateTime

Occasionally when working with CRM Portals you may run into the need to get the OnChange event for a date time field.  Because of the way that CRM Portals renders date time fields this is slightly more complicated then working with text boxes, check boxes and pick lists.  During my process I ended up reaching out to Microsoft for help on this and below are the steps they provided to help me with this problem: 1) Click on the date time control 2) Press F12 3) In console type $('div.control') and hit enter (this will give you a list of div controls) 4) Locate the div control for the date time field 5) Go to the entity form or web page in CRM and add the following code snippet (replace the 2 with the number your div control is located at): 1: $(document).ready(function () 2: { 3: var dpcontrol = $('div.control')[2]; 4: $(dpcontrol).on("dp.change", function (e) 5: { 6: alert("On chang

Validating User Input In CRM Portals With JavaScript

When we are setting up CRM Portals to allow customers to update their information, open cases, fill out an applications, etc. We want to make sure that we are validating their input before it is committed to CRM.  This way we ensure that our data is clean and meaningful to us and the customer. CRM Portals already has a lot validation checks built into it. But, on occasion we need to add our own.  To do this we will use JavaScript to run the validation and also to output a message to the user to tell them there is an issue they need to fix. Before we can do any JavaScript, we need to check and see if we are using JavaScript on an Entity Form or Web Page.  This is because the JavaScript, while similar, will be different.  First, we will go over the JavaScript for Entity Forms.  Then, we will go over the JavaScript for Web Pages.  Finally, we will look at the notification JavaScript. Entity Form: if (window.jQuery) { (function ($) { if (typeof (entityFormClientVali