Options

code to text conversion when the data is in table

hunnysingh_mpshunnysingh_mps Member Posts: 12
Hi everybody
please tell me that is code to text conversion is possible in data type in table when it consists of the data.






Thanks in advance
Regards
Hunny Singh

Comments

  • Options
    SavatageSavatage Member Posts: 7,142
    please clarify what you are trying to do.
    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?
  • Options
    DenSterDenSter Member Posts: 8,304
    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.
  • Options
    Maria-SMaria-S Member Posts: 90
    DenSter wrote: »
    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"

    Sorry for upping the dead topic :)

  • Options
    DenSterDenSter Member Posts: 8,304
    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 :)
Sign In or Register to comment.