Setup for v2.0

  • Download either the sync or async package https://dynamicscrmbinarystorageoptions.codeplex.com/releases/view/621408 and install the solution into CRM. Make sure you allow the plugin steps to be activated as well.
  • Go to Settings -> Customizations -> Customize the System -> Entities -> Binary Storage Options Configuration Setting
  • Under "Areas that display this entity", pick "Settings". You should also allow only administrators to be able to access this entity
  • Go to Settings -> Binary Storage Options Configuration Settings.
  • Add the following settings (key/value pairs, casing is important for keys) :
settings.png
  • Black -> Required setting for all providers with valid values for "Provider Type" :
    • "CrmDefault" - Basically a "bypass", will not move any blobs
    • "AzureBlob" - Azure blob storage (using https)
    • "AzureFile" - Azure file storage (using https)
  • Red -> Required for all Azure storage providers
  • Blue -> Required if "Provider Type" = "AzureBlob"
  • Green -> Required if "Provider Type" = "AzureFile"
    • If you have a directory structure deeper than the root, use the format "dir1/dir2/dir3", no leading or trailing /

It might be a good idea to set up these values as is, this is what the configuration in Azure looks like :

Blob

azureblobservicesettings.png

File

azurefileservicesettings.png
  • Enter your storage account and storage key values from azure :
azurestorageservicessettings.png
  • Something I totally forgot to add earlier. The user executing the plugin steps needs access to the Configuration Settings entity. You wouldn't want users to have access to this, so for now, you need to change each step to run under a User account with privileges to read the Binary Storage Options Configuration Setting entity. I'll see about changing the provider as this is a bit limiting...
  • Once everything is setup, test by adding both a note attachment somewhere and an email attachment
    • You should be able to create, read (download/view) and delete these. Check that the changes are reflected in your azure storage account of choice.

Using IOrganizationService.LoadProperty api

  • The plugin works as is in the CRM user interface. However, if you are using the LoadProperty method from the API in code somewhere to load annotations/and or attachments, you need to do some extra work :
    • You need to attach the "Retrieve" message to the PARENT object you're calling "LoadProperty" from. Attach the relevant AnnotationPostRetrieve or AttachmentPostRetrieve plugin.

Last edited Jun 6, 2016 at 8:50 PM by dawidpotgieter, version 5