Record already exists during OnModify

njhansen
Member Posts: 37
Error message:
The <table name> already exists. Identification fields and values: <field value pairs>
I've gotten this error many times, and it is generally self-explanatory after watching the debugger and seeing that something is trying to insert a duplicate record. However, this time is very strange:
1. no code is running (the only code in the OnInsert and OnModify and field Validate are MESSAGE commands so I can see the path it takes)
2. the record itself is being modified (the error should imply an insert or rename) and
3. of the three fields on the record that are not in the key, I can change two of them successfully, but changing the third one causes the error
I am manipulating the data directly on the table to eliminate form problems.
The debugger does not stop anywhere (except the MESSAGE commands I added to diagnose), even with "Break on Triggers" turned on
There are two things about the field that I cannot modify that are different:
1. It is used in a flowfield (lookup only, no SIFT index)
2. It is a Boolean (the other two are numbers, one decimal, one integer)
The table itself is used in a view that is used for a Linked Table elsewhere, but I don't know how that would cause one field to behave differently.
The <table name> already exists. Identification fields and values: <field value pairs>
I've gotten this error many times, and it is generally self-explanatory after watching the debugger and seeing that something is trying to insert a duplicate record. However, this time is very strange:
1. no code is running (the only code in the OnInsert and OnModify and field Validate are MESSAGE commands so I can see the path it takes)
2. the record itself is being modified (the error should imply an insert or rename) and
3. of the three fields on the record that are not in the key, I can change two of them successfully, but changing the third one causes the error
I am manipulating the data directly on the table to eliminate form problems.
The debugger does not stop anywhere (except the MESSAGE commands I added to diagnose), even with "Break on Triggers" turned on
There are two things about the field that I cannot modify that are different:
1. It is used in a flowfield (lookup only, no SIFT index)
2. It is a Boolean (the other two are numbers, one decimal, one integer)
The table itself is used in a view that is used for a Linked Table elsewhere, but I don't know how that would cause one field to behave differently.
0
Comments
-
Hi,
Considering that you looked at all possibilities form NAV,
It is very likely that there is an SQL trigger on this table that is causing the problem.
Use SQL studio Manager to connect to the SQL server and database and check for triggers.
Another option would to delete this table and to create it form scratch, just to make sure there is nothing on SQL that is culprit for this issue.
I hope this helps.
Thanks.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
- 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