Microsoft KB Archive/947061

= How to resolve common problems that may occur when you upgrade from Microsoft Dynamics CRM 3.0 to Microsoft Dynamics CRM 4.0 =

Article ID: 947061

Article Last Modified on 1/7/2008

-

APPLIES TO


 * Microsoft Dynamics CRM 4.0

-



INTRODUCTION
This article describes common problems that may occur when you upgrade from Microsoft Dynamics CRM 3.0 to Microsoft Dynamics CRM 4.0. This article describes how to resolve these common problems.



After you upgrade to Microsoft Dynamics CRM 4.0, the &quot;Check activities&quot; workflow condition does not work
In Microsoft Dynamics CRM 3.0, the &quot;Check activities&quot; workflow condition let you evaluate all activities or only those activities that were created by the workflow. In Microsoft Dynamics CRM 4.0, the &quot;Check activities&quot; workflow condition no longer exists. New conditions in Microsoft Dynamics CRM 4.0 include the following conditions:
 * Activity Count
 * Activity Count including Workflow

To work around this problem after you upgrade to Microsoft Dynamics CRM 4.0, delete the &quot;Check activities&quot; condition in the workflow. Then, include either the Activity Count condition or the &quot;Activity Count including Workflow&quot; condition.

The owner of a workflow that is not activated changes to the user who is performing the upgrade
Consider the following scenario. User 1 is the owner of a workflow that has not been activated in Microsoft Dynamics CRM 3.0. For example, the workflow has not been activated because it is in a draft state. You log on to Microsoft Dynamics CRM 3.0 as user 2 so that you can upgrade to Microsoft Dynamics CRM 4.0. In this scenario, the owner of the workflow is updated to user 2. To work around this problem, use one of the following methods:
 * Activate the workflow before you upgrade to Microsoft Dynamics CRM 4.0.
 * Run the upgrade as a user who is a member of the System Administrator role in Microsoft Dynamics CRM.
 * Log on as the correct user in Microsoft Dynamics CRM 4.0, and then create a new workflow.

Error message when you open an upgraded workflow
When you open an upgraded workflow in Microsoft Dynamics CRM 4.0, you receive the following error message:

Specified argument was out of the range of valid values.

This problem may occur if the workflow contains a date/time value that is set to a year that is earlier than 1900.

To resolve this problem, change the date/time value in the workflow to a value that is equal to or later than the year 1900.

For example, assume that the workflow contains the following date/time value. On Quote Create If Quote.EffectiveFrom > 1753 Then Create task End if To resolve this problem, change the workflow date/time value as follows. On Quote Create If Quote.EffectiveFrom > 1900 Then Create task Note The year 1753 is the earliest year value that was allowed in Microsoft Dynamics CRM 3.0.

Error message when you upgrade a workflow process instance
When you upgrade a workflow process instance, you receive the following error message:

Unable to cast object of type 'System.DBNull' to type 'System.String'.

This problem may occur when the workflow includes a regarding object that does not have the Name field populated. The Name field must be populated if the object is created by using Microsoft Dynamics CRM. However, the Name field does not have to be populated if the object is created by using the Microsoft Dynamics CRM Software Development Kit (SDK) or by using the bulk import feature.

To resolve this problem, re-create the workflow in Microsoft Dynamics CRM 4.0.

Upgrade sequence
If you have multiple Microsoft Dynamics CRM Web servers, upgrade only one Web server at a time. When you upgrade the first server, the Web site on this server will be upgraded. And, the Microsoft Dynamics CRM databases will be upgraded. After you complete the upgrade on the first server, you can upgrade the next Microsoft Dynamics CRM Web server.

When you upgrade to Microsoft Dynamics CRM 4.0, the Workflow service stops
The Microsoft Dynamics CRM 4.0 upgrade stops the Workflow service on the local computer. You must stop the Workflow service manually on each additional Microsoft Dynamics CRM Web server if you have multiple Microsoft Dynamics CRM Web servers in the same deployment. You must do this so that any data that is being processed by the Workflow service will be updated in the Microsoft Dynamics CRM database. Each Workflow service will read up to a maximum of 200 events in memory and then process the events. If the Workflow service is not stopped on each Microsoft Dynamics CRM Web server, the Workflow service will fail when the database is upgraded.

Error message when you upgrade a Microsoft Dynamics CRM Web server: &quot;The remote server returned an error: (500) Internal Server Error&quot;
Consider the following scenario. You upgrade the first Microsoft Dynamics CRM Web server to Microsoft Dynamics CRM 4.0. During the upgrade of the first Microsoft Dynamics CRM Web server, the Microsoft Dynamics CRM databases are upgraded. Then, you upgrade additional Microsoft Dynamics CRM Web servers in the same environment. When you run the Environmental Diagnostic Wizard, you receive an error message in the CRM40Setup.log file. This error message resembles the following error message:

[SqlException]: Cannot open database _METABASE; requested by the login. The login failed.

Login failed for user ' '.

Note The CRM40Setup.log file is located in the following folder:

C:\Documents and Settings\ \Application Data\Microsoft\MSCRM\Logs

This problem occurs because the Microsoft Dynamics CRM Web server is trying to connect to the Metabase database. The Metabase database no longer exists for Microsoft Dynamics CRM 4.0 because the Microsoft Dynamics CRM databases were upgraded when you upgraded the first Web server.

To resolve this problem, ignore the error message. Then, continue to upgrade the additional Microsoft Dynamics CRM Web servers.

The upgraded workflow rules fail when the rules are run on a new Microsoft Dynamics CRM 4.0 Web server
Consider the following scenario. You have workflow rules in Microsoft Dynamics CRM 3.0 that use the default Microsoft .NET assemblies. You upgrade the first Microsoft Dynamics CRM Web server to Microsoft Dynamics CRM 4.0. Then, you upgrade additional Microsoft Dynamics CRM Web servers to Microsoft Dynamics CRM 4.0. If the workflow rules are run on the first Web server that was upgraded, the workflow rules run as expected. However, in this scenario, the workflow rules on the additional Web servers fail.

This problem occurs because the Microsoft .NET assemblies are not present on the additional Microsoft Dynamics CRM Web servers.

To resolve this problem, copy and then register the Microsoft .NET assemblies on the additional Microsoft Dynamics CRM 4.0 Web servers.

The Update Contract States SQL job has changed
In Microsoft Dynamics CRM 3.0, the status of a contract is evaluated by the Update Contract States SQL job. This job runs one time per day at midnight. This job sets the expired contracts to a state of Expired.

In Microsoft Dynamics CRM 4.0, the status of a contract is evaluated as a recurring asynchronous system job. The time that the job is run is recorded as the time when the asynchronous service was started.

To resolve this problem, start the asynchronous service at an appropriate time for your organization.

Some foreign key constraints on custom entity tables are missing after you upgrade to Microsoft Dynamics CRM 4.0
Consider the following scenario. You have a custom entity table, and the custom entity table has a primary key constraint and a foreign key constraint on the same column. When you upgrade to Microsoft Dynamics CRM 4.0, the foreign key constraint is removed during the upgrade process.

For example, assume that you have a custom entity table that is called AuditTrailExtensionBase. The following foreign key is added. ALTER TABLE [dbo].[ | Error| Check ExportXmlValidator : Failure: The request failed with HTTP status 403: Forbidden.

Note The  placeholder is a placeholder for the time at which the error occurred.

This problem occurs when the Microsoft Dynamics CRM 3.0 Web site requires Secure Sockets Layer (SSL). To resolve this problem, click to clear the Require secure channel (SSL) check box, and then run the Microsoft Dynamics CRM 4.0 upgrade again. To do this, follow these steps:
 * 1) Log on to the server that is running the server components of Microsoft Dynamics CRM 4.0.
 * 2) Right-click My Computer, and then click Manage.
 * 3) Expand Services and Applications.
 * 4) Expand Internet Information Services (IIS) Manager.
 * 5) Expand Web Sites.
 * 6) Right-click Microsoft Dynamics CRM 3.0, and then click Properties.
 * 7) On the Directory Security tab, click Edit under Secure Communications.
 * 8) Click to clear the Require secure channel (SSL) check box, and then click OK two times.
 * 9) Reset IIS. To do this, click Start, click Run, type iisreset in the Open box, and then click OK.
 * 10) Run the Microsoft Dynamics CRM 4.0 upgrade again.

