Primary Key on Item table problem

Johannes_Nielsen
Member Posts: 206
Hi all 
Running NAV 5.0 on SQL 2008
I get the attached error when renaming an Item (both form the Item Card and directly on table)
The error states that a Custom field should be part of the Primary Key.
I've found this solution which I executed on a copy of the db.
- Populated the No.2 field with uniqe values from No. field
- Promote No.2 to Primary key
- Reset the Primary key to No. field
So I'm asking

Running NAV 5.0 on SQL 2008
I get the attached error when renaming an Item (both form the Item Card and directly on table)
The error states that a Custom field should be part of the Primary Key.
I've found this solution which I executed on a copy of the db.
- Populated the No.2 field with uniqe values from No. field
- Promote No.2 to Primary key
- Reset the Primary key to No. field
So I'm asking
- Is this "fix", safe to execute on my production db?
- What could cause the error?
- Are there other ways of fixing this?
Best regards / Venlig hilsen
Johannes Sebastian
MB7-840,MB7-841
Johannes Sebastian
MB7-840,MB7-841
0
Answers
-
Update: The copied database was converted to Native.
Doing the "fix" on a copy, still on the SQL, does not solve the issueBest regards / Venlig hilsen
Johannes Sebastian
MB7-840,MB7-8410 -
:oops: Excuse me everyone, I solved the issue using this posting
http://mibuso.com/forum/viewtopic.php?f=23&t=41185&hilit=the+following+field+must+be
We had a custom table with a field and a table relation to the actual field in Item table
I changed "ValidateTableRelation" to "No".
I guess this table tried to validate values that was no more, in Item table. Causing the error when renaming an Item.
Sorry for any inconvenience :whistle:Best regards / Venlig hilsen
Johannes Sebastian
MB7-840,MB7-8410
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