web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Small and medium business | Business Central, N...
Answered

How can I modify the data type of a field when data has already entered?

(0) ShareShare
ReportReport
Posted on by

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 ?

I have the same question (0)
  • Verified answer
    Microsoft Dynamics 365 Business Central Profile Picture
    Microsoft Employee on at

    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.

  • Verified answer
    Gearoid Profile Picture
    Microsoft Employee on at

    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!

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders

These are the community rock stars!

Leaderboard > Small and medium business | Business Central, NAV, RMS

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 1,556 Super User 2026 Season 1

#2
YUN ZHU Profile Picture

YUN ZHU 1,028 Super User 2026 Season 1

#3
Grigorios Mavrogeorgis Profile Picture

Grigorios Mavrogeorgis 877 Super User 2026 Season 1

Last 30 days Overall leaderboard

Featured topics

Microsoft Training Manuals

Product updates

Dynamics 365 release plans