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