Do you mean you want to change the data type of a field while there is data in the field? This depends on what the data type is and what you want to change it to. Changing a Code field to a Text field should be no problem, as long as the field length is big enough.
Don't go around and change data types in the core application though, that is going to get you in DEEP trouble.
Changing a Code field to a Text field should be no problem, as long as the field length is big enough.
Unfortunately, it is not true even now in 2015 (or maybe it is not true already). You cannot change Code to Text without loosing all the data.
Although the official MSDN says you can:
"you can change the data type of a field from Code to Text even if the field contains data for some records"
This WAS true back in 2009, when I wrote that reply
Since then, the way that data type changes are done has been modified. I think since NAV 2015 (or maybe even 2013 in a certain CU), any data type change is considered a destructive change, and you will need to create an upgrade function to take care of data conversion.
You are right that it is no longer true, thanks for bumping this
Comments
It almost sounds like you want to change the datatype of a field in a table with code?
I'm not sure what you're really asking to do?
http://www.BiloBeauty.com
http://www.autismspeaks.org
Don't go around and change data types in the core application though, that is going to get you in DEEP trouble.
RIS Plus, LLC
Unfortunately, it is not true even now in 2015 (or maybe it is not true already). You cannot change Code to Text without loosing all the data.
Although the official MSDN says you can:
Sorry for upping the dead topic
Since then, the way that data type changes are done has been modified. I think since NAV 2015 (or maybe even 2013 in a certain CU), any data type change is considered a destructive change, and you will need to create an upgrade function to take care of data conversion.
You are right that it is no longer true, thanks for bumping this
RIS Plus, LLC