Autosplit facility - Error Message

I am creating a Purchase Order Vendor (POV) and I added 95 item in the PO, then when I tried to add the line 96, appear this message: "the autosplitkey facility cannot find a key between the current and the previous record."do you know what is the problem?


I am not sure what version you are on, but the autosplitkey is functionality that allows records to be inserted between other records. So I am wondering if you have inserting between other records when adding, or simply adding to the end? Also what version? if you are inserting in-between other entries, this is how the functionality works once you hit x amount of records. Here is an example we have for Journal Lines:

This problem occurs if thirteen new lines have been inserted between two previous journal lines.

By default, each journal line number in NAV is the previous line number plus 10000. If you insert a line between two lines, the new line number is generated halfway between the two line numbers. Therefore, you can insert 13 lines between two orignal lines before no available line numbers are left and the system generates the error. The work around is of course to add any new lines to the end of the document so that they number does not have to be split.

The above is a version 4 example we have in our knowledgebase articles, but I believe the functionality works the same in new versions.


Hi Nick, you are right, I was adding lines between other lines, but if I add a line from the bootm I don’t have a problem, I am using NAV 2009.

Autosplitkey will try to find a value between the lines that you are trying to insert a line. If the line numbers of those two lines are say 10000 and 20000, it will split it right in half and find 15000. Then, between 15000 and 20000 it will find 17500, then between 17500 and 20000 it will find 18750, etcetera.

At some point it gets to a point where the two line numbers are sequential, for instance 19999 and 20000. Because there is no value between 19999 and 20000, autosplitkey errors out, and you get the message that you are seeing.

Adding lines at the bottom of a form with autosplitkey will simply add 10000 to the previous line number. This can also cause problems when you change the sort order on the form, but that’s a different discussion :slight_smile: