Answered by:
CRM 2011 Import Organisation from CRM 4 Failure

Question
-
I am attempting to Import/Upgrade a CRM 4.0 Organisation into a clean install of CRM 2011.
I have backedup the CRM 4.0 database and restored it to the CRM 2011 database.
Then using the Deployment Manager I have kicked off the import of the organisation.
The import fails with the following error:
13:48:59| Error| Exception occured during Microsoft.Crm.Tools.Admin.OrganizationUpgrader: Action Microsoft.Crm.Tools.Admin.UpgradeDatabaseAction failed.
InnerException:
System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> Microsoft.Crm.CrmException: Updating CustomerAddress.postalcode.Length but it's not valid for update. Original value:120. New value:100.
at Microsoft.Crm.Metadata.AttributeUpdateAction.DetectLengthChanges(MetadataBusinessEntity updateData)
at Microsoft.Crm.Metadata.AttributeUpdateAction.UpdateAttributeTable()
at Microsoft.Crm.Metadata.AttributeUpdateAction.MetabaseOperation()
at Microsoft.Crm.Metadata.MetadataHelper.ProcessQueue_MetabaseActions(CounterList listCounters)
at Microsoft.Crm.Metadata.MetadataHelper.ProcessQueue()
at Microsoft.Crm.Setup.DiffBuilder.Pass1(String metadataLocation, String languageCode)
--- End of inner exception stack trace ---
The Post Code field on customer address has been customised to be 60 through the CRM 4.0 interface.
It seems as though the default size for this field in 2011 is 50.I have tried insatlling Roll Up 1 for CRM 2011 but no joy.
Anyone have an idea on how to resolve this?
Thanks
NicWednesday, May 25, 2011 2:00 AM
Answers
-
Based on this link I had a look at the sys.columns and MetadataSchema.Attribute table for my organisation.
http://social.microsoft.com/Forums/en-US/crmdeployment/thread/be1aa37a-3dc8-4b00-9939-0fe0dd93c0a0
I ran the following query to confirm that the lenght of my postalcode column is 120.
select
name, max_length, object_name([object_id])
from sys.columns
where name = 'postalcode'
and [OBJECT_ID] = object_id('CustomerAddress')
I then ran this next query to confirm that the MetadataSchema thought that the fields Length was also 120 and the Length was 60.
select
DefaultValue, Length, MaxLength, IsNullable, IsLogical,CustomizationLevel
from MetadataSchema.Attribute
where AttributeId = 'D067356D-D916-4AD4-BBFF-05C9EA291254'I then ran this next query to update the MaxLength and Length of the Attribute to be as CRM 2011 was expecting.
update
MetadataSchema.Attribute
set Length = 100, MaxLength =50
where AttributeId ='D067356D-D916-4AD4-BBFF-05C9EA291254'
The import now completes sucessfully but this does seem less than Kosher.
Is this the only way to get round this type of problem?Cheers
Nic- Marked as answer by Nic Waight Wednesday, May 25, 2011 7:46 PM
Wednesday, May 25, 2011 4:19 AM -
Hi,
Yes this was the correct solution of this type of problem. In some cases even have to delete few records from the database.
Please mark as answer if you find the reply useful.
Thank You,
Jehanzeb Javeed,
http://worldofdynamics.blogspot.com
Linked-In Profile |CodePlex Profile
Thank You, Jehanzeb Javeed, http://worldofdynamics.blogspot.com Linked-In Profile | CodePlex Profile- Marked as answer by Nic Waight Wednesday, May 25, 2011 7:46 PM
Wednesday, May 25, 2011 10:53 AM
All replies
-
Based on this link I had a look at the sys.columns and MetadataSchema.Attribute table for my organisation.
http://social.microsoft.com/Forums/en-US/crmdeployment/thread/be1aa37a-3dc8-4b00-9939-0fe0dd93c0a0
I ran the following query to confirm that the lenght of my postalcode column is 120.
select
name, max_length, object_name([object_id])
from sys.columns
where name = 'postalcode'
and [OBJECT_ID] = object_id('CustomerAddress')
I then ran this next query to confirm that the MetadataSchema thought that the fields Length was also 120 and the Length was 60.
select
DefaultValue, Length, MaxLength, IsNullable, IsLogical,CustomizationLevel
from MetadataSchema.Attribute
where AttributeId = 'D067356D-D916-4AD4-BBFF-05C9EA291254'I then ran this next query to update the MaxLength and Length of the Attribute to be as CRM 2011 was expecting.
update
MetadataSchema.Attribute
set Length = 100, MaxLength =50
where AttributeId ='D067356D-D916-4AD4-BBFF-05C9EA291254'
The import now completes sucessfully but this does seem less than Kosher.
Is this the only way to get round this type of problem?Cheers
Nic- Marked as answer by Nic Waight Wednesday, May 25, 2011 7:46 PM
Wednesday, May 25, 2011 4:19 AM -
Hi,
Yes this was the correct solution of this type of problem. In some cases even have to delete few records from the database.
Please mark as answer if you find the reply useful.
Thank You,
Jehanzeb Javeed,
http://worldofdynamics.blogspot.com
Linked-In Profile |CodePlex Profile
Thank You, Jehanzeb Javeed, http://worldofdynamics.blogspot.com Linked-In Profile | CodePlex Profile- Marked as answer by Nic Waight Wednesday, May 25, 2011 7:46 PM
Wednesday, May 25, 2011 10:53 AM