locked
Upgrade CRM 2011 to 2013 - Error on organization import RRS feed

  • Question

  • Hi,

    I'm getting the following error while trying to import the organization of our 2011 environment into our new created 2013 environment:

    Error| Exception occured during Microsoft.Crm.Tools.Admin.OrganizationUpgrader: Fehler bei der Aktion Microsoft.Crm.Tools.Admin.ImportDefaultDataAction.
    InnerException:
    Microsoft.Crm.CrmException: When doing an update during system install or upgrade the base instance must be the system component.  Current base solution id: fd140aae-4df4-11dd-bd17-0019b9312238   

    Can someone help me?

    Wednesday, January 28, 2015 10:33 AM

Answers

  • I’ve got exactly the same issue. I’ve tried to import a CRM2011 org to new CRM2013 setup. It took me almost a month to figure out how resolve it.
    First of all I’ve dumped all transactions in SQL server, while importing an org. Analyzing the errors have led me to “systemformbase“ table in ORG_MSCRM database.

    Step1. Before importing an organization we need to change “overwritetime” fields (which is located in “systemformbase“ table) that are equal to “1900-01-01 00:00:00.000” to any relevant date/time.

    update systemformbase
       set Overwritetime='2015-06-28 00:00:00.000'
    where OverwriteTime = '1900-01-01 00:00:00.000'


    After it’s done we can import the organization to MSCRM 2013.

    Step2.  While importing CRM does not see these  forms and  creates new duplicates with “zero” OverwriteTime fields. If you run your CRM system in this phase you will most likely get errors on forms and/or entities (especially on custom ones). As I can understand CRM logic, setting Overwritetime to anything but “zero” ('1900-01-01 00:00:00.000') turns off this entity completely. And you cannot reverse the changes you’ve made in step1 because of the duplicates (I can’t recall the exact SQL error, “key field duplicating” or so). The next task is to find out these newly created duplicates, delete them and only them (CRM2013 adds entities and forms that is not existed in CRM2011).

    select FormId
    into #temp
      from SystemFormBase
      group by FormId,SolutionId
      having count(*) > 1
    
     delete from SystemFormBase
     where FormId in (select FormId from #temp)
     and SolutionId = 'fd140aad-4df4-11dd-bd17-0019b9312238'
     and overwritetime='1900-01-01 00:00:00.000'
    
     drop table #temp 



    Step3. And finally set “zero” value to forms we’ve changed in Step1.

    update systemformbase
       set Overwritetime='1900-01-01 00:00:00.000'
    where OverwriteTime = '2015-06-28 00:00:00.000'



    That’s it, it worked. Magic.
    I would be very appreciated for any comments on the solution. I’ve got opened ticket in MS for now, maybe they will shed a light on it.


    Sam-wise


    • Proposed as answer by -shana- Wednesday, September 30, 2015 3:56 PM
    • Edited by Sam_wise Thursday, October 1, 2015 12:02 PM
    • Marked as answer by F. Schulz Tuesday, November 10, 2015 3:07 PM
    Wednesday, September 30, 2015 2:51 PM
  • From the error message it is clear that the update action is trying for a transition of the entity form with GUID {e6897fe2-1cc4-4e40-89af-8df02a27f8d9} from Unmanaged status to Managed status. Below SQL statement revealed that the entity form mentioned above is in Unmanaged status

    Select IsManaged, * from SystemFormBase where FormId = 'e6897fe2-1cc4-4e40-89af-8df02a27f8d9'

    If the form is in Unmanaged status the update process will try to convert it to Managed status provided that the overwritetime value is the default value.

    I would recommend modifying the SQL statement from @Sam_wise to include the condition of FormId, if you know which forms are in Unmanaged status.

    • Marked as answer by F. Schulz Tuesday, November 10, 2015 3:07 PM
    Wednesday, September 30, 2015 4:03 PM

All replies

  • I'm also getting the same error. I have some old code which is not supported in CRM 2013 - but I used IgnoreChecks registry setting to skip it for now, as I plan to address them later.

    How do we resolve this?

    Thursday, January 29, 2015 8:49 AM
  • Hi,

    I'm getting the same error for an organization... Someone have a solution ?

    Objecttypecode = 2011 => Contract : Never used this entity

    An other oragnization was upgraded succesfully

    17:24:42|Verbose| ImportItem: Processing Form with Id: e6897fe2-1cc4-4e40-89af-8df02a27f8d9, for entity 2011.
    17:24:42|Verbose| FormXml for ObjectTypeCode e6897fe2-1cc4-4e40-89af-8df02a27f8d9 imported.
    17:24:42|Verbose| ImportItem: Processing Form with Id: fefd73cb-e0f2-4c38-a6ec-cfeb1a742378, for entity 2011.
    17:24:42|  Error| System.Exception: Error.ActionFailed Microsoft.Crm.Tools.Admin.ImportDefaultDataAction ---> Microsoft.Crm.CrmException: When doing an update during system install or upgrade the base instance must be the system component.  Current base solution id: fd140aae-4df4-11dd-bd17-0019b9312238
       à Microsoft.Crm.CrmException.Assert(Boolean condition, String message)
       à Microsoft.Crm.Platform.SolutionAwareComponents.UpgradeProtectedTransition.ConstructActionSet(Int32 componentType, Guid objectId, Object operationParameter, BusinessComponentState currentState, ISqlExecutionContext context)
       à Microsoft.Crm.Platform.SolutionAwareComponents.ComponentStateTransition.Execute(Int32 componentType, Guid objectId, Object operationParameter, BusinessComponentState currentState, ISqlExecutionContext context)
       à Microsoft.Crm.BusinessEntities.BusinessProcessObject.DoUpdate(IBusinessEntity entity, FilterExpression filter, ExecutionContext context)
       à Microsoft.Crm.BusinessEntities.BusinessProcessObject.UpdateWithPipelineAndExtensions(IBusinessEntity entity, ExecutionContext context)
       à Microsoft.Crm.ObjectModel.SystemFormService.Update(IBusinessEntity entity, ExecutionContext context, DynamicMetadataCache cache, Boolean ignoreFormXmlLabels)
       à Microsoft.Crm.Tools.ImportExportPublish.ImportFormXmlHandler.UpdateForm(SystemFormService formService, MetadataHelper metadataHelper, LocalizedLabelService localizedLabelService, XmlNode formNode, String formType, String formXmlManaged, String originalBaseLanguage)
       à Microsoft.Crm.Tools.ImportExportPublish.ImportFormXmlHandler.ImportSystemForm(SystemFormService formService, MetadataHelper metadataHelper, LocalizedLabelService localizedLabelService, XmlNode formNode, String formType, String formXmlManaged, String originalBaseLanguage)
       à Microsoft.Crm.Tools.ImportExportPublish.ImportFormXmlHandler.ImportManagedFormNode(SystemFormService service, MetadataHelper metadataHelper, LocalizedLabelService localizedLabelService, XmlNode formNodeDiff, String formType, String originalBaseLanguage)
       à Microsoft.Crm.Tools.ImportExportPublish.ImportFormXmlHandler.ImportItem()
       à Microsoft.Crm.Tools.ImportExportPublish.ImportHandler.Import()
       à Microsoft.Crm.Tools.ImportExportPublish.RootImportHandler.RunImport()
       à Microsoft.Crm.Setup.Server.Utility.NewOrgUtility.OrganizationImportDefaultData(Guid organizationId, Version existingDatabaseVersion, XmlDocument importXmlDoc, Boolean setup, String importFilePath)
       à Microsoft.Crm.Setup.Server.Utility.NewOrgUtility.OrganizationImportDefaultData(Guid organizationId, Version existingDatabaseVersion, String importFile)
       à Microsoft.Crm.Tools.Admin.ImportDefaultDataAction.Do(IDictionary parameters)
       à Microsoft.Crm.Setup.Shared.CrmAction.ExecuteAction(CrmAction action, IDictionary parameters, Boolean undo)
       --- Fin de la trace de la pile d'exception interne ---, Error, RetryCancel, Option1

    Thanks

    Friday, September 4, 2015 10:00 AM
  • I’ve got exactly the same issue. I’ve tried to import a CRM2011 org to new CRM2013 setup. It took me almost a month to figure out how resolve it.
    First of all I’ve dumped all transactions in SQL server, while importing an org. Analyzing the errors have led me to “systemformbase“ table in ORG_MSCRM database.

    Step1. Before importing an organization we need to change “overwritetime” fields (which is located in “systemformbase“ table) that are equal to “1900-01-01 00:00:00.000” to any relevant date/time.

    update systemformbase
       set Overwritetime='2015-06-28 00:00:00.000'
    where OverwriteTime = '1900-01-01 00:00:00.000'


    After it’s done we can import the organization to MSCRM 2013.

    Step2.  While importing CRM does not see these  forms and  creates new duplicates with “zero” OverwriteTime fields. If you run your CRM system in this phase you will most likely get errors on forms and/or entities (especially on custom ones). As I can understand CRM logic, setting Overwritetime to anything but “zero” ('1900-01-01 00:00:00.000') turns off this entity completely. And you cannot reverse the changes you’ve made in step1 because of the duplicates (I can’t recall the exact SQL error, “key field duplicating” or so). The next task is to find out these newly created duplicates, delete them and only them (CRM2013 adds entities and forms that is not existed in CRM2011).

    select FormId
    into #temp
      from SystemFormBase
      group by FormId,SolutionId
      having count(*) > 1
    
     delete from SystemFormBase
     where FormId in (select FormId from #temp)
     and SolutionId = 'fd140aad-4df4-11dd-bd17-0019b9312238'
     and overwritetime='1900-01-01 00:00:00.000'
    
     drop table #temp 



    Step3. And finally set “zero” value to forms we’ve changed in Step1.

    update systemformbase
       set Overwritetime='1900-01-01 00:00:00.000'
    where OverwriteTime = '2015-06-28 00:00:00.000'



    That’s it, it worked. Magic.
    I would be very appreciated for any comments on the solution. I’ve got opened ticket in MS for now, maybe they will shed a light on it.


    Sam-wise


    • Proposed as answer by -shana- Wednesday, September 30, 2015 3:56 PM
    • Edited by Sam_wise Thursday, October 1, 2015 12:02 PM
    • Marked as answer by F. Schulz Tuesday, November 10, 2015 3:07 PM
    Wednesday, September 30, 2015 2:51 PM
  • From the error message it is clear that the update action is trying for a transition of the entity form with GUID {e6897fe2-1cc4-4e40-89af-8df02a27f8d9} from Unmanaged status to Managed status. Below SQL statement revealed that the entity form mentioned above is in Unmanaged status

    Select IsManaged, * from SystemFormBase where FormId = 'e6897fe2-1cc4-4e40-89af-8df02a27f8d9'

    If the form is in Unmanaged status the update process will try to convert it to Managed status provided that the overwritetime value is the default value.

    I would recommend modifying the SQL statement from @Sam_wise to include the condition of FormId, if you know which forms are in Unmanaged status.

    • Marked as answer by F. Schulz Tuesday, November 10, 2015 3:07 PM
    Wednesday, September 30, 2015 4:03 PM