Microsoft Dynamics NAV

---------------------------

The Item Journal Line already exists. Identification fields and values: Journal Template Name='PROD. ORDE',Journal Batch Name='CRONUSGRO',Line No.='-2147477296'

---------------------------

OK

 

You may encounter this error when you try to open production Journal via released production order.

The major reason is number of data recoded for INT variable has exceeded. When user open production journal the system automatically creates temporary item journal lines. This has been generated via user ID & depend on the domain name. According to code unit 5510-Production journal Mgmt the following code will retrieve first ten characters from user ID.

ToBatchName := DELCHR(COPYSTR(User,1,MAXSTRLEN(ItemJnlLine."Journal Batch Name")),'>','0123456789');

When user opening production journal page the production journal batch is inherited by the usernames and it comprises of first 10 digits of the username. if company domain name longer than 10 characters irrespective of the username. All user’s id will refer same production journal batch, and this will affect to overflow this variable & error message appeared as above.

We have added additional code line & update toBatchName variable to create unique journal line user ID wise. Then temporary journal line will create user ID wise.

 

ToBatchName := COPYSTR(User,14,MAXSTRLEN(ItemJnlLine."Journal Batch Name"));

 

Further reference: -

https://en.wikipedia.org/wiki/Integer_(computer_science)