locked
CRM 4 to CRM 2011 migration problem (probably a bug in deployment manager) RRS feed

  • Question

  • Hello

    I'm trying to migrate an organization from Dynamic CRM 4 to CRM 2011 on an on-premise deployment. The CRM 4 organization itself has been migrated from CRM 3 several years ago. During migration process I encounter two error messages:
    1. Which is ignorable (a message box with ignore in it):

    Action Microsoft.Crm.Tools.Admin.UpgradeFormScriptToJscriptLibraryAction failed.
    Unable to cast object of type 'System.DBNull' to type 'System.String'.

    2. Which is not ignorable and I have to abort the whole process:

    Action Microsoft.Crm.Tools.Admin.MoveOrgUIToSystemForm failed.
    Unable to cast object of type 'System.DBNull' to type 'System.String'.

    18:36:50| Info| InputResult: Retry 18:36:50| Info| CrmAction execution time;

    MoveOrgUIToSystemForm; 00:00:00.7812650 18:36:50| Error| System.Exception: Action Microsoft.Crm.Tools.Admin.MoveOrgUIToSystemForm failed. ---> System.InvalidCastException: Unable to cast object of type 'System.DBNull' to type 'System.String'. at Microsoft.Crm.Setup.Server.Utility.SystemFormUtility.FetchFromOrgUI(ExecutionContext context) at Microsoft.Crm.Setup.Server.Utility.SystemFormUtility.MoveForms(ExecutionContext context, OrganizationResourceHelper organizationResourcesHelper) at Microsoft.Crm.Setup.Server.Utility.NewOrgUtility.MoveOrgUIToSystemForm(Guid organizationId, Version existingDatabaseVersion, OrganizationResourceHelper organizationResourcesHelper) at Microsoft.Crm.Tools.Admin.MoveOrgUIToSystemForm.Do(IDictionary parameters) at Microsoft.Crm.Setup.Common.CrmAction.ExecuteAction(CrmAction action, IDictionary parameters, Boolean undo) --- End of inner exception stack trace ---, Error, RetryCancel, Option1

    Although the second error message aborts the migration process I'm able to import the organization again and migration process ends with a success message, and apparently everything works fine except

    1. Under Customization->Customize the System->Entities I can see only one custom entity, no customizable entities (account, contacts, etc) and no other custom entities.
    2. When I open up a custom entity under CRM 2011 left panel it shows records but when I click on one of the records, CRM window pops up with the following error: [NullReferenceException: Object reference not set to an instance of an object.] at Microsoft.Crm.Application.Forms.CustomizableForm.GetFormDescriptor(Int32 typeCode, FormType formType) at Microsoft.Crm.Application.Forms.CustomizableForm.Execute(Entity entity, FormType formType) at Microsoft.Crm.Application.Components.Utility.GenericEventProcessor.RaiseEvent(String eventName) at Microsoft.Crm.Application.Controls.PageManager.OnPreRender(EventArgs e) at System.Web.UI.Control.PreRenderRecursiveInternal() at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint

    Tuesday, August 23, 2011 3:02 PM

Answers

  • Solved the problem by diving into Migration.Crm.Tools.Admin.DMSnapinLib.dll source code using .NET Reflector. There, I found out that FormXml column in OrganizationUIBase returns null value for some unknown reasons and breaks the execution flow abnormally (IMHO it's a bug in in migration tool, there must be some null checking or at least more descriptive error message referring to record id in the database). By updating the null column value to empty string and importing CRM 4 organization again the migration process went smoothly and thoroughly and it's working fine right now.
    • Marked as answer by Amir Razmjou Wednesday, August 24, 2011 7:32 AM
    Wednesday, August 24, 2011 7:32 AM

All replies

  • Solved the problem by diving into Migration.Crm.Tools.Admin.DMSnapinLib.dll source code using .NET Reflector. There, I found out that FormXml column in OrganizationUIBase returns null value for some unknown reasons and breaks the execution flow abnormally (IMHO it's a bug in in migration tool, there must be some null checking or at least more descriptive error message referring to record id in the database). By updating the null column value to empty string and importing CRM 4 organization again the migration process went smoothly and thoroughly and it's working fine right now.
    • Marked as answer by Amir Razmjou Wednesday, August 24, 2011 7:32 AM
    Wednesday, August 24, 2011 7:32 AM
  • Thanks it's worked for me ;)
    Wednesday, December 14, 2011 3:10 PM