"Then I need to copy all the existing data from Table A to Table B"
For this use TRANSFERFIELDS if table B is a copy of A. Otherwise copy all values individually.
Jimmy if you dont explain in details what you need it will be hard to help you
Make one simple example like TableA.No, TableA."Line No." then copy to TableB.Code, etc....
you can delete it from the development environment or sql but wouldnt recooment it unless is custom table. Otherwise it might contain functions used by reports/pages/condeunits which you would need in general!
using your test database, you could delete the table from object designer, then compile all objects to detect if any relationship was broken after deleting the table.
I am sorry I did not fully put in what I am asking for. I meant to do it via AL Coding in Visual Studio Code instead of Dynamic Development Environment. What I need is, from Table A, I added a new field call newField. Then I need to copy all the existing data from Table A to Table B in order to change the primary key and fill the data in to the newField automatically as well.
Take note that: The newField is the new primary key.
"Then I need to copy all the existing data from Table A to Table B"
For this use TRANSFERFIELDS if table B is a copy of A. Otherwise copy all values individually.
Jimmy if you dont explain in details what you need it will be hard to help you
Make one simple example like TableA.No, TableA."Line No." then copy to TableB.Code, etc....
After that, can I know how do we delete the Table A? Since Table B is now permanent in the database and will using and Table A will not be using anymore.
ahhhh now I know what you want to achieve
that is tricky indeed !!!
the answer is on the launch.json file
when you use the Recreate option it will erase all data for all tables used for your extension
if you are in development phase, lucky you, just rebuild all
but seems like you have a live scenario, where you want to copy all data to different tables, and then rebuild solution and move data back to original tables.
if you need my help i might be able to help you, skype me joao.bagdonas
Answers
Take note that: The newField is the new primary key.
For this use TRANSFERFIELDS if table B is a copy of A. Otherwise copy all values individually.
Jimmy if you dont explain in details what you need it will be hard to help you
Make one simple example like TableA.No, TableA."Line No." then copy to TableB.Code, etc....
that is tricky indeed !!!
the answer is on the launch.json file
when you use the Recreate option it will erase all data for all tables used for your extension
if you are in development phase, lucky you, just rebuild all
but seems like you have a live scenario, where you want to copy all data to different tables, and then rebuild solution and move data back to original tables.
if you need my help i might be able to help you, skype me joao.bagdonas
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!