item category code
gulamdastagir
Member Posts: 411
iam inserting data into item table using ADO but the issue is when iam inserting an item with item category code character length >10 the insert fails for the record
i tried to increase the item category code for item from the table designer but i get the same overflow error
any ideas?
i tried to increase the item category code for item from the table designer but i get the same overflow error
any ideas?
Regards,
GD
GD
0
Comments
-
First of all. I would seriously consider a solution where you don't have to insert more than 10 charecters into the field. If you change the lenght you are asking for trouble.
The field is linked to several other tables. All these tables have to be changed in order for you to be able to use the information after you have imported it.
However if you are looking for an optin to import, and then handle the problems later, it should be enough to increase the lenght in Item (like you have done) and in table "Item Category"
But as I said, be careful! Everytime a code, table, report etc uses Item Catagory, it will be expecting 10 charecters. And this will create frustrated users as navision will make an overflow error.Don't just take my word for it, test it yourself0 -
use a 10 character or less for the Category code and put your longer full category name in the description field.
you can chop your code (if you want) better to change it yourself but anyway
"Item Category".CODE := COPYSTR(YourImportedDataHere, 1, 10);0 -
Inserting data directly into the Item table with ADO is a bad idea. You should insert the data into a staging table, and have a NAV process insert the date from the staging table into core tables, in such a way that NAV standard bisuness logic is executed, such as field validation.0
-
Before modifying the length of Code field, please check in how many tables it is linked. Instead of doing this you can user a shot codes
and put details in Description field.
Because Iem category Code is linked with Sales line, Purchase line and
so many other tables.Darshan Mungekar
Senior Consultan0 -
Navision Development 101:
Code fields are either 10 or 20 Characters
Master tables have Code(20) fields as primary keys
Supplemental tables have Code(10) fields as primary keys
Item Category is a supplemental table. Yiou will have far less problems if you adhere to these and the other rather simple rules when working with Navision.There are no bugs - only undocumented features.0
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
- 323 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
