No-permission-to-create-a-field-workaround: Table generator

Administrator
Member, Moderator, Administrator Posts: 2,506
No-permission-to-create-a-field-workaround: Table generator
You all know the problem:
You did some customisations on a table. You want to apply a new hotfix, which adds a new field in that table. You start merging, and want to import your txt. You have no permission to add that new field from that hotfix into a table.
Here is a workaround in case this happens a lot for one hotfix/localisation/add-on/whatever:
- You create a new default NAV db (without data) with the new objects imported (import the fob in it).
- import this tablegenerator
- start form 70020
- fill in the tablefilter for all NAV tables that were changed (by the hotfix/add-on/...)
- select an empty map and press OK ... the tool creates some txt-files
- start form 70022 to create one large file
- import this file into the same database
- compile
- export the fob
- import it into the database you should import it with "merge exsisting <- New" ... your fields have been created
- overwrite the objects with your merged txt file (which gave the error in the first place
This is a tool that has been written in spare time ... so as quick as possible ... so don't be too critical about it
http://www.mibuso.com/dlinfo.asp?FileID=817
Discuss this download here.
You all know the problem:
You did some customisations on a table. You want to apply a new hotfix, which adds a new field in that table. You start merging, and want to import your txt. You have no permission to add that new field from that hotfix into a table.
Here is a workaround in case this happens a lot for one hotfix/localisation/add-on/whatever:
- You create a new default NAV db (without data) with the new objects imported (import the fob in it).
- import this tablegenerator
- start form 70020
- fill in the tablefilter for all NAV tables that were changed (by the hotfix/add-on/...)
- select an empty map and press OK ... the tool creates some txt-files
- start form 70022 to create one large file
- import this file into the same database
- compile
- export the fob
- import it into the database you should import it with "merge exsisting <- New" ... your fields have been created
- overwrite the objects with your merged txt file (which gave the error in the first place
This is a tool that has been written in spare time ... so as quick as possible ... so don't be too critical about it

http://www.mibuso.com/dlinfo.asp?FileID=817
Discuss this download here.
0
Comments
-
In thisthread, I tried to explain the workaround in other words.I created a workaround to merge two add-ons. It comes down to:
- create tables without code and fields with those numbers
- create fob
- import fob: Merge Existing <- New
- import merged textfile.
Once, I put a download on Mibuso:
http://www.mibuso.com/dlinfo.asp?FileID=817
This tablegenerator creates the tables for you without code.
Import the generated text file in (a copy of) the existing database where you uploaded the Add-On in, compile the tables, export as fob and import it in the database where you would upload your merged textfile in (import Merge Existing <- New). Now, your fields that you couldn't create, are created.
Remember to work with databases without data (so without companies).
When you have your merged text files, it just takes an extra 10 minutes with this workaround for all your tables.. (no matter how many).0 -
:-k I think there's a simpler solution to this ... use the field table.
In your modified database; export the entire field table.
In the new Cronus (or no-data) import every field you can, insert them into the field table. This won't create tables; you'd have to use the object table for that.
Also extend every text field that's longer in your database and any similar upgrades that the FOB import can do by itself (eg: int->bigint).
All the modified objects in the new Cronus should now import nicely into your working DB (if Microsoft hasn't broken the Cronus overlay that is) and make it ready for TXT imports.
Do NOT try the dataport import on a database with a lot of data; it will work but VERY slowly becuse each Field.INSERT is a table redesign.Robert de Bath
TVision Technology Ltd0 -
Ah, that's a good approach.
But isn't it a manual job, or how do you automate it?
hm, may be reading the field table of the new db, filter it, get the fields in excel, and import excel in the field table of the new db... .
hm... :-k . Nice one.
Should think this over :-k
Thx!0 -
I don't see why it needs to be more that an export + import.
The export can export everything.
The import checks the data that exists currently in the new DB and uses a few simple rules to throw away rows it can't use.
eg:
If either the field No or the Table No is in 50000..99999 and the field doesn't already exist it can be created IFF the table exists.
Otherwise the field can be modified if the new column type is 'better' in some way.
Sounds easy.Robert de Bath
TVision Technology Ltd0
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