The Value Entry already Exists , Identification fields and values : Entry no.='274565'

Hi Everybody,

I try to excute a batch to post my Transfer Orders automaticlly but I have this Error Message:

The Value Entry already Exists , Identification fields and values : Entry no.=‘274565’

this message launched when my report go to the seconde record .

my Report based on Transfer header table and called the same code unit for posting Transfer orders.

Transfer Header - OnAfterGetRecord()

TransHeader:=“Transfer Header”;


IF TransHeader.“Expédition.Auto” THEN


IF TransHeader.“Recéption.Auto” THEN


my batch can ship and receive at same time

any help you are welcome

thanks in advance.

Try using commit between shipment and receive

Hi Anil,

Thank you man for your reply , I used commit but there 's the same error message.

i try to verify more.

From where your are calling this report ?

Is it from Transfer Header screen or from somewhere else?

I try to execute it directly, but after when i’m sure is all right i should execute it from a codeunit.

thanks in advance.

You need to execute report from transfer header screen only so it will get current record .

I can’t do that because i should execute my codeunit using Nas Program and I had a lot Transfer Orders to execute a the same time,

A commit after each run statement should work.

In most cases, it is good to avoid the use of a commit so everything rolls back if some error is encountered and in that case, we would need to restructure your code.

In this case, you might really want a commit after each one of your run statements (both the ship and the recieve) so if you had ran through 100 transfters before one encountered an error you wouldn’t have to run them again.

If you are interested in restructuring without the two commits, look at LockTable for the value entries. That should get you on the right track for how to restructure your code.

Hi Teresa,

thanks for your reply,

I added the commit after each run statement ,but unfortunately i had the same message .

this message came from the function in the code unit 22

IsFirstValueEntry(ItemLedgEntryNo : Integer) : Boolean

ValueEntry.SETCURRENTKEY(“Item Ledger Entry No.”);

ValueEntry.SETRANGE(“Item Ledger Entry No.”,ItemLedgEntryNo);


thanks in advance.

Thanks EveryOne replied at my question.

I resolved this Error message by using Codeunit instead Report and I used 2 blocks of code script one for shipping and the seconde for receiving.

Best regards.