Chapter 10. Developing Offline Solutions

One of the unique benefits of Microsoft Dynamics CRM is that your users can use Microsoft Dynamics CRM for Outlook with Offline Access to work with customer data while they are disconnected from the server. This feature can come in handy if your users need to work someplace without an Internet connection, such as on an airplane, at a trade show, or onsite at a customer’s office. Microsoft Dynamics CRM refers to the concept of working disconnected from the server as working offline. When the user reconnects to the server again (known as going online), Microsoft Dynamics CRM for Outlook with Offline Access will automatically perform a bidirectional update of data changes with the server. Therefore, records created or modified while offline update to the CRM server.

As a developer, you should know how your programming customizations will behave if your company deploys Microsoft Dynamics CRM for Outlook with Offline Access. Fortunately, Microsoft Dynamics CRM includes an offline API so that most of your programming customizations can run offline in addition to online. Of course, you should learn about a few unique nuances to developing offline solutions. One of the most significant constraints of offline development is that workflow rules and asynchronous plug-ins do not execute offline.

In this chapter we will talk about communicating with the Microsoft Dynamics CRM SDK offline and then guide you through creating custom IFrame pages and plug-ins that function both online and offline. The chapter covers the following topics:

  • Overview of developing with Microsoft Dynamics CRM for Outlook with Offline Access

  • Offline development environment

  • Offline navigation

  • Communicating with the Microsoft Dynamics CRM SDK API offline

  • Scripting for offline

  • Developing IFrames for offline

  • Developing an offline plug-in

  • Offline development considerations

Overview

When you install Microsoft Dynamics CRM for Outlook with Offline Access, the software automatically installs all of the components your users need to work offline, including:

  • Microsoft ASP.NET Cassini, the same Web server used by Microsoft Visual Studio 2008

  • Microsoft Dynamics CRM Web files

  • Microsoft SQL Server 2005 Express Edition, used to store the local copy of the Microsoft Dynamics CRM database

The Web files are installed to the same location that was selected during the install of Microsoft Dynamics CRM for Outlook. You can also find this location by looking at InstallPath value in the following registry key: HKEY_LOCAL_MACHINESOFTWAREMicrosoft MSCRMCLIENT. That folder contains a folder named Client, and under the Client folder is another directory named res that contains the Web files.

Tip

Tip

The default location of the offline Web files is C:Program FilesMicrosoft Dynamics CRMClient esweb, and the offline database files are installed to C:Program FilesMicrosoft Dynamics CRMsql4.0.

When the user is offline, Microsoft Dynamics CRM references data in the local database instead of the data on the CRM server. By default, Microsoft Dynamics CRM for Outlook does not copy the entire server database to the local database. Instead, Microsoft Dynamics CRM for Outlook uses local data groups to determine which subset of the data it should copy to the client computer. Users can modify their local data group within the CRM menu in Microsoft Dynamics CRM for Outlook.

Tip

Tip

The MSDN Code Gallery offers a tool that you can use to automate the local data group creation for multiple users. You can find this tool at http://code.msdn.microsoft.com/mscrmlocaldatagroup.

During your offline development, you may want to query or manipulate your test data in the offline database. You can do this easily by using Microsoft SQL Server Management Studio Express to connect to the offline database. You can download SQL Server Management Studio Express for free from the Microsoft Web site: http://www.microsoft.com/downloads/.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset