Rename Tables

KappeKappe Member Posts: 64
Hello

Is there a way to rename a table within code in a codeunit?
I want to move data from one table to another and then change the name of the new tables to the old names. But I know that I have to change before the name of the old tables.

Is there a way to solve this within a codeunit?

Regards
Kappe
___________________________________________

Kappe

Comments

  • zimiwingszimiwings Member Posts: 20
    Yes, it's possible. Have a look at the Upgrade Toolkit, to see how it's done.
    Daniel Zimmermann
  • KowaKowa Member Posts: 925
    You have to access the table 2000000001 "Object"
    Object.GET(Object.Type::Table,'',Table::MyTable);
    Object.validate(Name,'MyNewtable');
    Object.MODIFY;
    

    but do not change any names of standard objects.
    Kai Kowalewski
  • KappeKappe Member Posts: 64
    Hello

    Thank you for the answers - it works.

    There are no standard objects on my list. We want to move self made objects to another range.

    Regards
    Christian
    ___________________________________________

    Kappe
Sign In or Register to comment.