Is it possible to add fields to a table and a tablebox dynamically? For example, I have 3 fields in a table and the tablebox, I want to add the 2 more fields without going to design mode in the table and the tablebox.
I don't think it can be but I just wanna be sure about it because I don't want to be with misconceptions.
0
Comments
Freelance Dynamics AX
Blog : http://axnmaia.wordpress.com/
To do it. All you have to do is insert into the field table.
Independent Consultant/Developer
blog: https://dynamicsuser.net/nav/b/ara3n
Seriously though, you don't want to do that, it will only cause problems. Just stick to the Table design and work with the limitations of the IDE.
RIS Plus, LLC
RIS Plus, LLC
Keep in mind that if you do this, then not all the properties are set, so these new fields will have some strange actions. To fix it you need to open up the object designer and recompile, so since you have to open the designer, just add the fields whilst you are there.
Why do you have to stir up the hornet's nest?
AP Commerce, Inc. = where I work
Getting Started with Dynamics NAV 2013 Application Development = my book
Implementing Microsoft Dynamics NAV - 3rd Edition = my 2nd book
I've used it once to write a report to change the data type of one of the fields in 8 tables.
The report created a new field. Moved the data from old field to new field.
Changed the datatype to new datatype. Transfred data back into the old field. Cleared the new field and deleted the field.
The report did on the fly and the data type was changed from option to code, linked to a table.
The other option was to export all the data, empty the field. import the new fob, etc etc.
And this whole time people where working on other modification in development db.
So in order to continue development and not wait for this modification to go into production, I decided to first option.
Independent Consultant/Developer
blog: https://dynamicsuser.net/nav/b/ara3n
Instead of creating new tables, move the data to new tables, and load the new objects, they could save the time and restructure the table with processing CU or report.
Ofcourse it has limitation as David mentioned, but it is useful in certain scenarios.
Independent Consultant/Developer
blog: https://dynamicsuser.net/nav/b/ara3n
Independent Consultant/Developer
blog: https://dynamicsuser.net/nav/b/ara3n
As much as I don't like messing around like this. I agree in this case, that the upgrade tool kit is one place where something like this could be used.