I recently was trying to create a NAV/D365 Business Central Sales Order import, but ran into multiple errors so I’ll be writing about the things I have encountered while importing Orders to help you all avoid my mistakes. I will only refer to NAV in the article, but the same procedure can be used in Business Central.

Creating an Order in NAV

Creating an Order in NAV is straightforward. You can decide if you want to provide the document number or allow NAV to generate it.

**Note: When creating an Order do not map a value to the ‘Key’ field as this is a unique value created by NAV on creation.

When creating a mapping to NAV you are required to include whether certain fields are specified. By default, all these specified fields are blank, and treated as ‘True’ when processing. This is not a problem with most fields, but there are some exceptions. There are not any specified fields you need to change on the header, but at a minimum the following fields need to be switched to ‘False’ in your line mapping.

Column NameList Option
Line AmountSpecifiedFalse
TotalSalesLine Line AmountSpecifiedFalse
Total Amount Excl VATSpecifiedFalse
Total VAT AmountSpecifiedFalse
Total Amount Incl VATSpecifiedFalse

Updating an Order Header

Once the Order is created you may need to update it. Updating Orders is trickier than creating them. Updating headers will require one of these fields to be mapped. ‘No’, ‘Key’ or ‘External_Document_No’ are used to identify which Order will be updated. You will want to set your key field and grouping to one of these three fields.

Updating Order Lines

Updating the lines for a NAV Order will require you to provide every line on the Order even if you won’t be updating it. You will need to include all order details in your data source. If all lines aren’t in your source, you can use a multi-data source with your source column and NAV to add the missing lines.

Updating Order Lines with Unique Items

When importing an Order where each item on the order is only used once, you will need to group your Order Line mapping on the ‘No’ field.

Updating Order Lines with multiple lines with the same Item

When importing an Order where an Item exists on the order multiple times you will need to group on the SalesLines_Line_No which holds the line number which increments by 10000 with every line.
Example: 10000, 20000, 30000