g/l entry - vat entry link already exists.

This is the message I get when I try to post a payment journal:

the g/l entry - vat entry link already exists. Identification fields and values: g/l entry no.=’’, vat entry no.=’’

I checked the VAT entry and the G/L entry tables as well as the G/L entry - VAT entry link table

and any pair in the G/L entry - VAT entry link table that does not exist in both the VAT entry and the G/L entry tables

I cleared them from G/L entry - VAT entry link table.

After this process the posting goes through without the message again.

My question is am I doing the right thing or there is a better way?

Hi,

Try to delete the G/L entry No. and the VAT entry no. ,

If it is production please dont try without the client approval.

Regards,

Bharath K

Do not delete something… I think the source code do wrong actions. Do you have NAV from “Box” or some AddOns installled?

no nav from box (NAV 2013)

OK. It is strange. How many lines this journal has?

Do you able to post first 5-10 lines, if it is possible?

It’s a batch

posting 5-10 lines still generates the same message

And I think you have same for 2 and 1 line only (e.g. do filtering by Document No), right?

I think you have issue with procedure which fill data. Or you insert all this list manually?

I am not getting you

How do you receive this lines for posting?

a journal batch is created

And the question kinda was… How was the lines created. We do know its a journal batch :wink:

-is it standard Code?

  • Can you post a single line?

  • What line is the exact problem (use the debugger to find it)?

This should never be able to happen on standard NAV code, and the solution is surely NOT to delete any created GL or VAT Entries, that is a crazy suggestion!!!

If the code is 100 standard then there is one “old” problem and that is if you post many lines with documents no and different posting dates. For Example you can get a posting error i some cases if

Line No / Posting Date / Document No.

1 / 01-01-01/ 1

2 / 03-03-03/ 2

3 / 02-02-02 / 3

Problem is increasing Document Nos, with declining Posting Dates.

The Solution is to try to filter (ALT+F3) on one of the Posting Dates and post all lines.

REMEMBER - The general rule is: the more detailed question on how to reproduce the error, with example of “demo-Data” gives you the best answer to your problem. Right know its a lot of “no-brain” mails back and forward gaining enough information to give the right answer.

Where is the 1 line for the journal batch come from? (if it is standard system without code injection and you can’t post 10 lines the issue with posting data).

P.S. What localication of NAV 2013 do you use?

is it standard Code? Yes it is a standard Code

  • Can you post a single line? No I can’t

  • What line is the exact problem (use the debugger to find it)? It happens on the fifth line when posting all lines at once and then when you decide to post one line at a time

And the question kinda was… How was the lines created. We do know its a journal batch :wink: : The lines were entered manually and the posting dates are the same.

This is what I found out also:

G/L Entry Table


.
.
12375 - the last entry number


VAT Entry Table


.
.
4988 - the last entry number


G/L Entry - VAT Entry link Table


.
.
12375 4988 - link between the the last G/L Entry Number and the last VAT Entry Number
12376 4989
12377 4990
12378 4991
12379 4992
12380 4993
12381 4994
12382 4995
12383 4996
12384 4997
.
.


That did not really answer all of Palle’s questions!!!

Is it in a 100% standard unmodified NAV database? With no changes (whatsoever)?

Are you able to post a single line? Also when did this error start and does it happen in other journals also? Mean what is different when it works and when it doesn’t work?

And when you ran it with the debugger, as suggested by Palle, then where in the code does it happen?

It is really difficult to help you, when you only add part of the information in each post and we have to drag every answer out. You have been a member here since 2012, so you should know how to ask a question… [emoticon:ca08b2c27c2f40e993e89508acf29e0b]

It should not be here… because not each line for GL Entry has line with VAT Entry

It’s a standard nav 2013 W1 database with no modification. I am not able to post a single line.

This is the first time and it happened on Monday 8th October, 2018 and it does happen in general journal too.

When I debug, in the codeunit 12 under the function “InsertVAT”, when the “InsertLink” function on table 253 (G/L Entry - VAT Entry link) is called the message pops up- It is about to insert the link between the g/l entry and vat entry into the “G/L Entry - VAT Entry link” Table.

Delete these lines (from LastUsedNo+1 till last) and try again.

That is what I did in a demo environment and it works, but I was asking if there was another way apart from that method?