Don't think that's going to work in regular C/AL, maybe if you use ADO and connect directly to SQL Server and hack your way into the system. I guess if you are really dead set to hack your way into the object table, which nobody recommends because that's where the objects of your company's mission critical ERP system are stored, then what you could do is turn on the SQL Profiler and manually create a table within Navision and the profiler will tell you exactly what SQL statements are run. Then you could try to recreate that with some ADO programming.
You have to realize though that by doing that you jeopardize the entire system. If you corrupt the data (by that I mean make it so that Navision doesn't know what to do with it) then your system might suddenly stop working altogether.
What I want is a form where I enter the ID of a table, a directory and filename, and the ID and name for a new codeunit. Then I click on a button and the form generates a codeunit (in the form of a txt file which can be imported) that should create a duplicate of the table and fill it with the same lines as the original. This is so that you can create a table in your own system and then easily transfer it to a customer's. I know that you could simply ex- and import the table, but this would only be the first step. When it is finished, it would be expanded to create a single codeunit for multiple tables.
I hope this is understandable :oops:
after creating a table via the object table, I can't add fields to it, neither manually nor through a codeunit. Where's the problem :-k
Thanks in advance Master of Dragons
If you are trying to create objects with C/AL code directly into Object table, and you want add fields through Field table, forget it. It is not possible...
Comments
What message do you get by trieing manualy?
You have to realize though that by doing that you jeopardize the entire system. If you corrupt the data (by that I mean make it so that Navision doesn't know what to do with it) then your system might suddenly stop working altogether.
RIS Plus, LLC
But I guess there isn't any ](*,)
What is it that you need it for? Maybe we can think of some alternative...
I hope this is understandable :oops:
If you are trying to create objects with C/AL code directly into Object table, and you want add fields through Field table, forget it. It is not possible...
MVP - Dynamics NAV
My BLOG
NAVERTICA a.s.
Thanks to all of you, who tried to help me!