Mar 052012
 

Mindthecloud.net is starting series of articles about MS Dynamics CRM and Azure. The main idea is to popularize some of the Azure architectural patters that can be utilized with MS Dynamics CRM. You might ask why, well …I do believe that Azure is a complimentary part of some XRM based solutions, we can easy leverage some cloud capabilities that will allow us/you to build more effective, scalable, flexible with fresh enthusiastic approach (but with the business value) systems. Series of articles will focus primarily on helping the users/partners/architects/developers understand how to use Windows Azure + MS Dynamics CRM 2011. I don’t want to say that Azure is THE ONLY available solution for some of the scenarios I rather just show you where Azure services are useful, and shows how you can use them in your own solutions.

Every article will have business scenario, proposed solution, pros and cons, I thought about sample “trivial” implementation but that depends if there will be some interests. Let’s start then, I’m not going to write any introduction to Azure there is a lot of books/msdn articles which talk in details about every available Windows Azure service, just go to Azure Developer Center and find a lot of videos guides etc. http://www.windowsazure.com/en-us/develop/overview/.

Business Problem

Company XYZ is using MS Dynamics CRM 2011 as system for creating orders. Dynamics CRM is hosted online (for that particular scenario it doesn’t matter where Dynamics CRM is hosted). Company XYZ has got business partner which fulfils their orders two branches in two different locations. Partner has business application which has to be hosted on premise in one of the locations where the stock is kept. Business decided that every 2 hours all orders created should be transferred to business partner, so we need secure reliable communication between CRM and this on-prem app without giving access to MS CRM for partner.

Solution

The proposed solution is one of many varieties which can be used to solve that business challenge. I’d like to use/utilize on of the fantastic capabilities which are offered by out of the box  Windows Azure Integration with Microsoft Dynamics CRM. MS Dynamics CRM 2011 has been integrated with the Windows Azure platform by coupling the Microsoft Dynamics CRM event execution pipeline to the Windows Azure Service Bus so effectively during save/update operation we can send processed information to Azure Service Bus. MS CRM 2011 can send those messages to service bus using 4 different contracts: queued, one-way contract, two-way contract, or a REST contract if you want detailed information please have a look here http://msdn.microsoft.com/en-us/library/gg334766.aspx . A queued contract in our case is probably the most interesting one, is using Service Bus Queues. Lets’ have a look at diagram

clip_image002

Advantages

What that kind of approach gives us.

Proposed architecture is based on brokered messaging “pattern”. The core components of the Service Bus brokered messaging infrastructure are queues, topics, and subscriptions, for now we’re going to concentrate just at queues. MS CRM sends the processed entity (order) directly to prepared queue. That queue acts as a buffer and can store orders for certain period of time called default message time to live. (Can be set on message or if not queue settings apply) moreover partner will connect just to queue not directly to our CRM application. Azure Service Bus Queues are using ACS claims and can utilize roles with ACS roles, every request must be authenticated so our communication is secure. Well we met all business requirements and we achieved even more. Let’s look at benefits summary.

1) Separation of concerns/decoupling. Partner doesn’t have to connect directly to our MS CRM app.
2) Secure and reliable cross-boundary communication.
3) Load-leveling buffer, this comes extra, partner receiver application doesn’t have to be developed as super scalable app just in case we overstressed it by sending huge amount of orders , queue acts as an buffer prevents overload.
4) We didn’t touch that subject but we also we have load balancing.
5) From that pub/sub is just “behind the corner” but that will be subject of next article.

p.s Credits to Marco Amoedo for review of that post.

All comments and suggestions are very welcome, if someone is interested in sample implementation I can prepare step-by-step tutorial.

Feb 232011
 

One of  the developers (Dias) from AlfaPeople UK  has started new blog about MS CRM. He publishes regularly probably more often than me Smile , and his blog it’s full of very useful tips/tricks, so if you are newbie you will find a lot of code examples which you can reuse  if you a master it’s definitely worth to visit that blog as well, you never know what you can find there.  Good luck Dias and please continue.

Link to blog http://crmdm.blogspot.com/

Oct 272010
 

Recipe for a good application CRM 2011-  Windows azure Cuisine

Ingredients :

  • CRM 2011 beta (Online)
  • Windows Azure Web Role
  • WCF Service
  • Claims based authentication (knowledge)
  • CRM 2011 SDK
  • Silvelight 4
  • Coffe
  • Developers
  • Visual studio 2010

Take all ingredients , together mix with architecture (like on screen bellow ).

Use plenty of coffe (if you prefer coke that’s fine ) and I almost forgot assing some developers to that project. First you should start with Azure Webrole for hosting WCF service . This WCF service has to communicate with CRM 2011 online so you need to season that with claims based authentication  be careful it’s a bit challenging (DeviceID has to be generated etc.), When all authentication problems are cooked , add some Silvelight app I recommend custom bindings , Update ServiceReferences.ClientConfig to yourname.cloudapp.net domain and then create azure package and publish that on Azure. Don;t forget to copy Microsoft.IdentityModel.dll :) then invite customer and enjoy :) .

I  tested that recipe and effect it’s preety amazing.

If you have any questions related to that recipe feel free to contact.

Oct 172010
 

Welcome in part 1. Let’s try to that OOB functionality which allows us to easy create connection to Appfabric Service Bus .

What we need
-Visual Studio 2010 preferable
-Plugin registraion tool – DIY job (We need to build that from sources).

How to build “Plugin registration tool” !//if you know how to do that skip next paragraph.
TO build Plugin registraion tool download Microsoft Dynamics CRM 2011 Software Development Kit (SDK) from http://go.microsoft.com/fwlink/?LinkID=200082 then install it. Find directory  Tools\PluginRegistration click PluginRegistrationTool.sln, this will open solution in Visual Studio, all what you need to do press F6 or Build. This will build new “plugin registraion tool” for us. Output files will be placed in  \Tools\PluginRegistration\bin\Debug (or Release depends which configuration you’ve used).
OK we need to test that tool so run plugin registration tool (PluginRegistration.exe) and connect to you environment.

Now it’s a bit of challenge to do that for online I hope this is because of beta version .
I’ve put https://myorganization.crm4.dynamics.com/ as discovery url and empty user name.


You will be will asked about creditentials after you press “connect” and if you are lucky   you will see screen like bellow

If you have problems. Try to do following.

For Exception Unhandled Exception: System.ServiceModel.Security.MessageSecurityException: …..
1) Try Delete %userprofile%\LiveDeviceID

2) Try to use diffrent Discovery Web Service URL.
North America   https://dev.crm.dynamics.com/XRMServices/2011/Discovery.svc
EMEA                https://dev.crm4.dynamics.com/XRMServices/2011/Discovery.svc
APAC                 https://dev.crm5.dynamics.com/XRMServices/2011/Discovery.svc

Pre-beta version showed “Microsoft.Crm.ServiceBus” on the plugin list , current version of plugin registroin tools doesn’t do that, but this funcionality still exists. Instead doint that in convensiopanl was assembly->plugin->step, we will just create endpoint and then register sdkmessageprocessingstep. Credits to person from MSFT for that explanation. I was a bit confused where OOB “Microsoft.Crm.ServiceBus” has gone but they made it clear.

Related posts
MS CRM 2011 and AppFabric (part 0) .

Sep 092010
 

Yes Hurray Beta version is available. I had a pleasure to see CTP versions before but now beta is for everyone. Microsoft Dynamics CRM 2011 has got a lot of new features , next generation outlook client , CRM  Ribbon and much more, for me most exiting bit is “cloud development”. CRM 2011 has native Windows Azure integration. New SDK provides 4 examples  where Windows Azure AppFabric plays major role . They look very promising, and I hope to blog about Dynamics CRM 2011 azure integration soon.

http://offers.crmchoice.com/CRM2011Beta-Landing