Record already exists during OnModify

njhansennjhansen 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.

Comments

  • vremeni4vremeni4 Member Posts: 323
    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.
Sign In or Register to comment.