New CRM Developer Book
In my spare time (ha! ) for the last year I have been working on writing a book targeted to developing applications on CRM 4.0. Originally, the book was going to be a short book focusing on workflow but has grown to over 600 pages covering all developer centric topics. In the book I talk about everything from setting up a developer environment to using SilverLight with CRM. You can read the full press release on the book on MarketWatch here.
This is not a "user" book, it's a developer book. I might even go as far as saying a power admin that wants to understand more about what's going on would benefit as well. The book goes deeper into developer topics like client scripting, web services, plug-ins and workflow than any of the other books currently released.
Most of the chapters in the book have samples that go along with them. There's also a Jump Start Framework that's over 13,000 lines of reusable code to jump start your learning of the platform. The license of the code is simple buy the book use the code....any questions? It includes things like client script to make calling the web services easier - no more concatenating strings and hoping it works. It also includes plug-ins, workflow activities and more. I will be blogging more in the future about some of the cool things in the samples and the framework that you can leverage. Realistically, even if you only used a few lines of the code it would pay back for the book 2-3 times over.
The book is available from the book web site http://www.thecrmbook.com and will be available in a month or so on Amazon and other retailers. The book is also available in e-book with simple content control - no complicated DRM (rights management) to drive you nuts. I've also started recording How-To videos here. They are starting really basic, but I will be diving deeper over time. If you have request send them my way.
Since you put up with my blog posts, I wanted to make it worth your while since many of you helped shape the content of the book. When you purchase your copy if you put daveblog in the discount code field on the checkout you will receive $10.00 off your print book purchase.
Why are you still here? Go buy your copy here http://www.thecrmbook.com/Purchase/PurchaseBook.aspx
Analytics for CRM 4.0
One of the more popular questions I get asked is when will the Analytics be released for CRM 4 - Yesterday Microsoft announced that they will be released in Q3 2008 - you can read the full details here.
Automatically Go Back On-line
I love the fact that the CRM 4.0 Outlook client is smarter about being able to drop me to offline when it detects the network connection is gone. The problem I have is I'm on and off the network a lot and I find myself getting left in offline mode.
It's really my fault, I just forget to go back on-line when I connect back to the network. In reality though, I think that CRM should take me back on-line automatically when the network connection to the server is available - after all that's how Outlook handles it's connection to Exchange server.
This has been bugging me for a while and I have had an idea on how I could try to fix it, I just haven't had time to build my idea. My idea is a simple Outlook Add in that you never see that simply uses the NetworkChange class that ships with the .NET Framework. Using that class you can ask to be notified when the network connectivity changes. I then use the Microsoft.Crm.Outlook.dll assembly that comes with the SDK and exposes properties that tell me if the CRM Client is Loaded and if the client is offline.
So what I do is in the add in when it starts up I register to be notified. In the notification handler I check if the CRM client is loaded and offline - if not I'm done and no further work is required. Next, I retrieve the Intranet/ExtraNet servers from the registry and then use "ping" to check if I can access the server. If I can, then I prompt the user as you can see in the following example.
I prompt because while I really want to go online most the time, there are times where I'm in a hurry and I don't want to take the time to Sync right then.
If the user clicks Yes, then I use the SDK assembly to call the GoOnline() function. Using this method, I'm able to start the CRM standard Go Online process that uploads changes from the offline queue to the CRM server.
Once that's done, I do something a little bit unexpected - I actually call the GoOffline() function to go back offline. The reason for this is simple, it helps me make sure my offline store is as current as possible when I drop the network again. This isn't 100% necessary as CRM 4 now has a new feature that can trickle update the store every so often that you can turn on. Using this capability while your online the offline store is updated every N minutes based on your configuration. You can find this setting in the CRM menu in Outlook on the Options dialog, Local Data tab. The following is an example of the option on that tab.
By default this setting is not enabled you need to turn it on after installation of the CRM Outlook Add-In.
I have found that the more frequent you sync up and keep current the less the risk is for having synchronization issues.
Once the GoOffline is completed, I turn around and do a GoOnline() call again. This time the GoOnline runs really quick because no work was done offline that needs to be uploaded. Once this process is completed you will see the following dialog to let you know the process is completed.
Disclaimer: The following link contains very new code that may or may not work in your environment. It's intended for a developer not an end user - so if you can't compile it you probably shouldn't use it ( but I do include an installer if your crazy enough to try it) I'm running Outlook 2007 on Vista and that's what this code has run on so far. If you find an issue - please let me know via the Contact Me link, however, don't expect me to fix it that's why I posted the code :)
http://crm.davidyack.com/storage/downloads/OutlookOfflineHelper-072208.zip
Using the CRM Demo VPC on Hyper-V
Now that Hyper-V on Windows 2008 has RTM'd I thought I would pass along some steps I went through to get the Demo VPC up and running under Hyper-V.
You can download the virtual hard drive for the Demo VPC here.
After uncompressing it to a local folder - I created a differencing virtual hard drive - that way I can use the downloaded base VHD for multiple servers - I then went back and created a new Virtual Machine pointing to that VHD I just created
Once the VM is up and running - you need to replace the old Virtual Server/Virtual PC machine additions with the integration services that comes with Hyper-V. You don't want to bypass this step because you will lose a lot of the features wit and from past experience performance will also suffer. Here's the steps I went through to swap out the old VM additions with the new Integration Services.
1 - Uninstall the existing machine additions - I had to do that via the Control Panel / Add Remove programs
2 - Reboot
3 - From Hyper-V admin for VM Action - Insert Integration Services (new name for additions )
4 - I had to manually go to the My Computers - Drive that was loaded with Integration Services and double click to cause it to start running
5 - It prompted to upgrade the computers HAL (Hardware abstraction layer)
6 - Reboot
7 - After reboot Integration Services installed automatically
8 - I was prompted for hidusb.sys that the detect new devices couldn't be found - since it didn't appear to have the file on the VHD , I chose to cancel and it skipped that step - I assume at this point it just means my VM won't have USB support - will investigate that later
9 - One more reboot
10 - At this point while the integration services were installed, they didn't seem right because hidusb.sys was missing -I was able to connect to a network at this point and copy that file and hidclass.sys from another windows 2003 server in our local network - and then re-ran the integration services installation
11 - after the re-run of integration services it prompted for install of new hardware - what it is trying to install is the mouse driver - which meant my mouse was useless so I had to use the keyboard to browse to windows\system32\drivers on the other server to pickup the missing driver - not sure if this was just my luck, or if that will happen to everyone - it made me appreciate the mouse!
Hopefully that will help you a little if you try to get one running under Hyper-V
In case your wondering - if you do a lot of demo's with CRM, running this setup on a demo Notebook works pretty well - in most cases I have found you can't get Sleep to work however and you might find that annoying.
I have two simple requests for the next Demo VPC in order of priority!
1 - Have Visual Studio 2008 installed instead of Visual Studio 2005
2 - have a version of the VHD that works with Hyper-V!
Training Kit for CRM 4.0 Now on MSDN
CRM ISVs Featured at WPC
Tomorrow is the first day of the Microsoft Partner conference in Houston - it runs from the 7th through the 9th. I know a popular question I've been asked in the last month was "Are you going?". Not this year, just did too much travel in June and still getting caught up! I am planning on catching a few of the sessions via the webcasts and I would love to hear from others that are there what was cool!
Last week I had the privilege of previewing a couple of the sessions that will be given and I wanted to highlight them in case you are heading to WPC.
I blogged in more details about this on my main blog including the session details - you can read that here.
Easy API Export of All Customizations
Did you know that you can easily export all the customizations using the API with just a few lines of code? This is similar to using the export all from the client interface only you can do this form your install, provisioning application or on a regular schedule. For example, we have a windows service that can point to any number of CRM organizations and just pull down a copy on a regular schedule.
This is great for having a regular backup of a development or other high change system. Sure you can backup the database, but sometimes you just want to have a copy of the customizations.
Here's a code example for calling the ExportCompressedAllXmlRequest
Using this method you get back a compressed versions of the customizations - you can also retrieve them in string format using the other export all method.
Plug-in Registration Tool Updated
There's a new version(2.1) of the plug-in registration tool up on code gallery - you can find it here http://code.msdn.com/crmplugin
This version has a few new features such as supporting https. If you haven't looked at the tool in a while, you should download and give it a try as it has changed a lot from some of the early beta versions!
