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,987

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
    raelhefn 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
    Bilal Haider 232 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
    Ghetz 2,987 on at
    RE: How to change table Ids without loosing data. NAV 2018

    OK.. Updated the question withe error shot

  • Bilal Haider Profile Picture
    Bilal Haider 232 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

Daivat Vartak – Community Spotlight

We are honored to recognize Daivat Vartak as our March 2025 Community…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Kudos to the February Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,516 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,430 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans