Rename Item

forest
Member Posts: 8
I got error on Renaming Item --
The field below much be included in the table's primary key
Field: Item Tracking Code
Table: Item
We are running NAV 4.00 SP3 version.
Has anyone seen this error? Thanks
RC
The field below much be included in the table's primary key
Field: Item Tracking Code
Table: Item
We are running NAV 4.00 SP3 version.
Has anyone seen this error? Thanks
RC
0
Comments
-
you have to do as it says to bypass this error
goto designer & the design the item table.
view->keys
add the missing key.0 -
I tried it. It did not work. The error was still.0
-
Somewhere you in your DB someone used table relation Item."Item Tracking Code" which is not possible. You can do table relation just to Primary Key fields. It is why it wants now to add the "Item Tracking code" into primary key.0
-
The keys are Valid in the Item table?0
-
If I understand correctly, you want to modify the Item Tracking code, and you are trying to do this with the RENAME command. You would only use the RENAME command when you want to modify the primary key value of the record. For any other type of modification of existing records, you simply set the field, and then you use the MODIFY command, like this:
MyItem.GET('SOMECODE); MyItem.VALIDATE("Item Tracking Code",'NEW VALUE'); MyItem.MODIFY(TRUE);
0 -
I want to rename ITEM, not the Item Tracking Code.
I use the core NAV function on the Item Card, or Item table and change the Item.No, which is the primary key of Item table. The NAV will start rename process. It started a while, then I got the error. Since we have implemented 3rd party solution, I wonder if any one can verify for me for the rename function in standard NAV 4.00 SP3 US version. Thanks a lot.0 -
I understand you want to rename Item, it's just that you should not be using RENAME when modifying the Item Tracking field.0
-
The RENAME function is ONLY for the primary keys renaming! Not any!Use this function to change a primary key in a C/SIDE table.
In normal case (not only in NAV) you cannot modify a primary key after insert procedure.
That time, when the Navision does not contains the RENAME function, we use a simple method for the renaming:rItem.GET(ValueOfPrimaryKey); rItemTemp := rItem; //or TRANSFERFIELDS rItemTemp.ValueOfPrimaryKey := 'AnotherValue'; if rItemTemp.INSERT(TRUE) then rItem.DELETE else ....
And I think your error message was this:The field below must be included in the table's primary key
Field: Item Tracking Code
Table: Item0 -
I also ran into this problem. Kine is absolutely dead right on the problem.
The way I fixed the problem was to export the modified table objects as text and searched through the field in question. After I found the problem, I removed the table relation and it renamed beautifully.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 -
if you just want to fix this one issue, so you can get the item renamed, then do a negative adjustment to bring the stock to zero. you will no longer have a tracking code assigned to it.
rename it.
then do a positive adjustment to bring it back and assign the tracking code back to the item.0 -
I have posted about this bug many times before on The Dynamics User Group and at least a couple of times here Very topic - Very strange RENAME behaviour
The bug was introduced in Financials ver 1.1. (0.9 and 1.0 did not have the bug). In the DOS version of Navision, reports imports and batch jobs had the name of the object as the primary key, but in Financials this was changed to an object number. So when you upgraded to financials they had to have a mechanism to allow a link to secondary keys. In reality this should have been just to do the upgrade, and then gone, but for some reason this "feature" remains till today.
PS I first reported this bug in 1996, so good luck in getting anyone now 12 years later to listen. Back then they could not fix it, since it would then be difficult to upgrade from DOS, but seriously it has no sense now.David Singleton0 -
I came across this error message and had to temporarily delete a table relation, make the change, and recreate the relation. This happened in 3.70. I tried the same thing with the same tables in 4SP3 and it works fine. Does anybody know if this has been corrected after some specific version?0
-
kapamarou wrote:I came across this error message and had to temporarily delete a table relation, make the change, and recreate the relation. This happened in 3.70. I tried the same thing with the same tables in 4SP3 and it works fine. Does anybody know if this has been corrected after some specific version?
No.
The reason why it's not corrected is because it may not be a bug. Navision probably wants to punish you for violating relational database design theories.
"you should not look up to a look up" :evil: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
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