Client Can’t Add New Sales Order Lines in Microsoft Dynamics 365 Business Central

Microsoft Dynamics 365 Business CentralI was onsite doing a small system review for a client recently. One of the issues they mentioned was that they were reaching the limit of the number of rows that could be entered in sales orders, comments and other areas of the system.

I didn’t think there was a practical limit to the number of rows you could add, so was a bit surprised. I asked them to show me an example and they used the sales order window.

The issue was sort of a Business Central issue, but not the one they thought it was. When you enter a word order line into Business Central the data is stored in the Sales Line (37) table, with one column being the Line No.

The first row in this field is set to 10,000 and a second line would be 20,000. If you insert a line where the cursor is, then the row number will be mid-way between the line above and below. for example if I have a two line order and insert a new line, it’s Line No. will be a 15,000.

Eventually, the system runs out of space to enter new lines half way between the lines. They always encountered this issue, as they’d leave the cursor on the first line and click the New Line button.

If you always put the cursor at the bottom of the lines then a new number will be created 10,000 higher than the previous:

Sales Order Lines section showing the cursor on a new line

This numbering is common to all record types with lines, including comments as well as sales transactions.