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
References (3)
-
Response: registry mechanicI? ve been looking for a product like this for 2 years now. Every since I put all my music on a computer. If you want to send music anywhere in your house or within 100 feet of the sending unit, this is it. Nothing fancy, it just works. As far ... -
Response: registry cleanersprivacy guard CLICK HERE TO CONTINUE� CLICK HERE TO CONTINUE� CLICK HERE TO CONTINUE� -
Response: top 10 crm software tipsCRM Wars»

Reader Comments