InsertlogEntry

siyaksiyak Member Posts: 66
Hi Pips!!
I've created a Table and is looking to the other table and they are working fine,the problem is when i'm inserting a new record and fill the fields and when i want to go to the next line it gives an error saying the record already exists.

The debugger stops at the change log when trying to insert the Entry on codeunit 423(InsertLogEntry(FldRef,FldRef,RecRef,0);).

Is this have something to do with the Keys of the tables.

Comments

  • NagiNagi Member Posts: 151
    It sounds like you've got duplicate values in the primary key field(s). Either make sure that you don't have duplicate values in the primary key field(s) or add another field to the primary key so that you won't get duplicate values.

    If you've got a typical "lines" table, like Sales Line and Purchase Line, etc, you could add the field Line No. with data type integer to the primary key. Then set the AutoSplitKey property in the form to Yes.
  • siyaksiyak Member Posts: 66
    Thanks for the reply,but the autosplit key is used when the primary is Decimal,biginteger,integer,GUID.My key is a code
  • NagiNagi Member Posts: 151
    Try setting the DelayedInsert property of the form to Yes. Make sure that the primary key fields are not identical before inserting the record.
  • David_SingletonDavid_Singleton Member Posts: 5,479
    siyak wrote:
    Hi Pips!!
    I've created a Table and is looking to the other table and they are working fine,the problem is when i'm inserting a new record and fill the fields and when i want to go to the next line it gives an error saying the record already exists.

    The debugger stops at the change log when trying to insert the Entry on codeunit 423(InsertLogEntry(FldRef,FldRef,RecRef,0);).

    Is this have something to do with the Keys of the tables.

    What version of NAV is this. It was a known bug in (I think) 3.70A
    David Singleton
  • siyaksiyak Member Posts: 66
    Its giving me error message saying the record already exist,Please help ](*,)
  • siyaksiyak Member Posts: 66
    I'm using Nav5
Sign In or Register to comment.