Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

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

How to change table Ids without loosing data. NAV 2018

(0) ShareShare
ReportReport
Posted on by 2,999

Because of licensing changes, we need to change the Object ID of some custom tables that have data in it. For example Table 50020 must now we table 50001.

If we try to change the object ID, we get an error "cannot change a table's oibject id" Any ideas?

pastedimage1606389265459v1.png

We have already taken care of code changes, with the NAV Object Renumbering Tool, but now we need to change the object ID of the acutual tables

  • Suggested answer
    raelhefn Profile Picture
    on at
    RE: How to change table Ids without loosing data. NAV 2018

    Another Suggestion,

    You use upgrade codeunits when you make changes to a table definition, either from the Microsoft Dynamics NAV Development Environment or during an upgrade. Upgrade codeunits migrate existing business data from the old table structure into the new table structure. An upgrade codeunit serves the following purposes:

    Provides instructions for how to handle data changes to a table during schema synchronization. For more information, see Synchronizing Table Schemas.

    Provides the logic for migrating existing data in the business data table from the old format to the new format after schema synchronization.

    Provides instructions for updating custom report layouts to dataset changes. For more information, see Updating Custom Report Layouts by Using Upgrade Codeunits.

    For example please refer to : (Instead of change fields id's or type, use it migrate data to the new created table)

    community.dynamics.com/.../day-to-day-nav-upgrade-codeunits

    forum.mibuso.com/.../renumbering-objects-in-navision

  • Suggested answer
    Bilal Haider Profile Picture
    248 on at
    RE: How to change table Ids without loosing data. NAV 2018

    Hi,

    First task is to create a new table:

    1. Rename the already existing the table name e.g. Employee to Employee - Marked for Removal

    2. Create a new table with ID 50001 and name it properly e.g. Employee

    3. Copy the fields from 50020 and paste them in Designer of new table. Compile new table.

    4. New table is ready.

    Next task is to copy data from old table to new table. For this you can use Rapid Start Services (RSS) in NAV.

    1. Create a Configuration Package.

    2. Add both tables to this Package.

    3. Export both tables in excel.

    4. Copy the data from old table excel file to new table excel file.

    5. Import data to Configuration package for the new table from new table excel file.

    6. As both tables are identical there will be no errors.

    7. Apply

    8. Delete old table

  • Ghetz Profile Picture
    2,999 on at
    RE: How to change table Ids without loosing data. NAV 2018

    OK.. Updated the question withe error shot

  • Bilal Haider Profile Picture
    248 on at
    RE: How to change table Ids without loosing data. NAV 2018

    Please post exact screen shot of error

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

🌸 Community Spring Festival 2025 Challenge Winners! 🌸

Congratulations to all our community participants!

Adis Hodzic – Community Spotlight

We are honored to recognize Adis Hodzic as our May 2025 Community…

Kudos to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

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

#1
YUN ZHU Profile Picture

YUN ZHU 428 Super User 2025 Season 1

#2
Mansi Soni Profile Picture

Mansi Soni 302

#3
Sagar Dangar, MCP Profile Picture

Sagar Dangar, MCP 276

Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans