Friday 28 February 2014

Import Solution issues in Ms Dynamics CRM - Brain Dump 5

A few weeks back we were trying to import the main solution to our test environment when hit a particularly nasty issue:
Index size error
Updating mre_stamp.mre_name.Length is not valid because this is an indexed attribute and hence cannot have size greater than 900. Original value:200. New value:1000. Existing index is ndx_mre_name with type=6
The obvious solution here is to remove the index and set the field length back to the original value, but if that's not an option then and alternative solution would be to do this:

 1. Unzip the solution zip file.
 2. Open the customizations.xml file in your favourite text editor.
 3. Search for the <attribute PhysicalName="<attributeName>" (use the attribute from the error).
 4. You are looking for something like this (Notice how Length is greater than MaxLength):


 5. Change Length to the same value as MaxLength.
 6. Repeat 3-5 for each field in the SQL index.
 7. Re-Zip the solution file, making sure that the customizations.xml file is in the root folder.
 8. Re-Import Solution.

1 comment:

  1. Thanks for the post, Very useful.
    I tried deleting the index and updating the value but CRM still complains about having the same index, anyIdea on where all we need to delete the index co that lets me update the field length of new_name field of CRM

    ReplyDelete