Friday, March 29, 2013

How to enable MS Dynamics CRM 2011 to integrate with Windows Azure

Hi,

I'm writing this article to explain a good architecture design for integrating your Microsoft Dynamics CRM 2011 with windows azure.

Let's  say you have on-premise CRM 2011 instance, and you want to use Windows Azure Blob storage to store Customer's documents on the cloud. How would you do that ?

The example i'm giving is applicable to any other windows azure service such as: SQL Azure, Mobile Notification Service, AppFabric Features..etc.

Since Windows azure is a scalable Cloud platform, you can easily integration your CRM 2011 with the windows azure on the cloud in 4 main steps.

Before going through the details, I'd like to explain the architecture of the proposed solution.

MS CRM 2011 has a backend windows service called "CRM Asynchronous Service" this is the component that will be in charge to communicate with the windows azure through a service bus.

MS CRM 2011 has 2 types of plugins, out-of-the box (OOB) and custom plugins. The OOB plugins runs  with full trust but the custom plugins runs with partial trust, and we will develop a custom plugin to connect to a listener through azure service bus.

The solution has the following components:

1) Configure CRM to be Windows Azure Aware.

2) We need to configure a service bus on Azure with an endpoint to communicate with the CRM server.

3) A listener hosted in Windows Azure to communicate with the asyncrhounous service, specificially listening to CRM assembly "Microsoft.Xrm.Sdk" with RemoteExecuteContext defined. so we need to develop a listener and deploy it on windows azure.

4) A custom CRM Plugin to communicate with the Windows Azure Listener.


How To accomplish, configure and develop this solution:

1) To accomplish step 1 , "Configure CRM for Integration with Windows Azure" :
http://technet.microsoft.com/en-us/library/gg328249.aspx

2) To accomplish step 2, "Configure Windows Azure ACS on Azure" :
http://technet.microsoft.com/en-us/library/jj863635.aspx

3) How to write a windows azure listener:
http://technet.microsoft.com/en-us/library/gg309615.aspx

C# Sample code - Listener:
http://technet.microsoft.com/en-us/library/gg309657.aspx

4) To accomplish step 4, "How to write Azure Aware CRM Plugin":
http://technet.microsoft.com/en-us/library/gg328194.aspx

Note, if you want to develop a custom workflow activity:
http://technet.microsoft.com/en-us/library/gg327854.aspx

Registration step - FINAL:
http://technet.microsoft.com/en-us/library/gg328524.aspx


**Here is some sample code for all what i mentioned above "listeners & plugins":
http://technet.microsoft.com/en-us/library/gg334712.aspx

Note: you should be having CRM SDK and Windows Azure SDK 1.7 or higher to be able to exercise and develop the solution.

Hope this helps.


Reference:
-Azure Extensions for Microsoft Dynamics CRM 2011:
http://technet.microsoft.com/en-us/library/gg309276.aspx



 

No comments: