Customization · Dynamics CRM 2011 · Solution

CRM 2011 – Delete / Change Data Type of Field in Managed Solution

Today I needed to change data type of a custom field. So I deleted the old attribute, and then create a new one with the correct data type of the same name. All is well until I needed to deploy from Development (unmanaged) to Test (managed). I tried to delete the attribute manually on Test, but since it’s managed, it is not allowed.

I can simply uninstall the solution and then install the new one from Dev. Doing this however will make my tester’s life very difficult as data will be lost. We don’t want that now, do we. 😦

All is not lost though, there is a way to do this, although it is very cumbersome.

1. Export managed solution from Dev (with the attribute removed)
2. Extract the .zip file and rename the solution’s unique name in solution.xml file. Say rename it to (solution_temp)
3. Import solution_temp into Test
4. Delete solution from Test
5. Create the new attribute of the same name with the correct data type
6. Export managed solution from Dev (with the new attribute created)
7. Import solution into Test
8. Delete solution_temp from Test

Cheers – Sy

6 thoughts on “CRM 2011 – Delete / Change Data Type of Field in Managed Solution

  1. What do you do if the client has customized the managed solution? This process will obviously delete all customizations.

    1. Hi Barry,

      Managed solution cannot be customized. What can be done is customizing the default unmanaged solution of the organization. If this is the case, then the changes won’t be lost. Although depends on what customization the client has done, it might make the process much more problematic.

      Sy

Leave a reply to sliong Cancel reply