Dynamic addition of attribute.

roshanthapa
Member Posts: 90
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.
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
-
-
it can be done, but I would not recommend.
To do it. All you have to do is insert into the field table.0 -
noooooooooo don't do it!!!!
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.0 -
I liked nuno's answer betterApathy is on the rise but nobody seems to care.0
-
-
ara3n wrote:it can be done, but I would not recommend.
To do it. All you have to do is insert into the field table.
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.David Singleton0 -
ara3n wrote:it can be done, but I would not recommend.
To do it. All you have to do is insert into the field table.
Why do you have to stir up the hornet's nest?Confessions of a Dynamics NAV Consultant = my blog
AP Commerce, Inc. = where I work
Getting Started with Dynamics NAV 2013 Application Development = my book
Implementing Microsoft Dynamics NAV - 3rd Edition = my 2nd book0 -
Well the user was asking if it could be done. I just wanted to let them know that it can be done, but I would not recommend it.
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.0 -
The update toolkit could use this to improve the update process.
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.0 -
edit0
-
ara3n wrote:The update toolkit could use this to improve the update process.
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.
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.David Singleton0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions