Hey guys,
I have a table and nearly all fields are from data type decimal, but one is integer.
I would like to change that integer-field to decimal.
I did a test on my local machine and I could recognize, that all the data of my data get lost, when I changed the data type from integer to decimal and when I saved the changes (compiled with force).
How do you think I can change the data type without losing all my data?
Or would it make more sense to leave the data type with integer?
Could there be any calculation errors later because it is not of the data type decimal ?
Hi,
You use Dynamics NAV upgrade codeunits when you make changes to a table definition from the Development Environment. Upgrade codeunits migrate existing business data from the old table structure into the new table structure.
For more information see the following links:
docs.microsoft.com/.../upgrade-codeunits
community.dynamics.com/.../day-to-day-nav-upgrade-codeunits
forum.mibuso.com/.../how-to-use-upgrade-codeunits
It is also possible to manage this via TSQL by taking a copy of the table before you make the table schema change and then replacing the missing values afterwards. This is fine for a test environment but we would recommend a upgrade codeunit for managing this process in a live enviornment.
Hope that helps!
Hi
i believe this is not better solution to modify data type for column Containing transaction also you should know the impact of this change this will impact on other tables.
you can do below steps on your Local Machine :
1- know the other tables will effected by this modifications
2- take backup from them
3- make your update
4- after that reinsert your data again according to this change
5- try to make new transaction that will take effect with new change
please note all this modification should be tested well on test server to avoid any issue in production.
Sohail Ahmed
2,655
Mansi Soni
1,574
YUN ZHU
1,453
Super User 2025 Season 1