DMT - Sales Order Combined - The first order line should start from 1

I’m creating / testing a template I’ve made for our sales team, but whenever i fill in the templates fields, its showing an error every time I process it.

‘The first order line should start from 1’

And as you can see from the screen shot, the first order line does start from 1 which is extremely confusing. The template has worked for a few orders already I don’t understand why its not working now.

Has anybody else had this problems?

I would look to resolve the error on line 1 first. It’s talking about SMTP settings - seems like a BPM trying to fire with a Send Email widget perhaps.

As line 1 is failing, it’s probably the cause for the subsequent lines failing with that specific error.

1 Like

In addition to the SMTP error, I think it’s trying to create a new Sales Order for every line in your template file, because every line has an OrderNum of 0.

It creates a sales order and creates line 1, then creates another sales order and tries to create line 2 without a line 1. Then it creates another sales order and tries to create line 3 without lines 1 or 2, and so on…

I’ve struggled with this in the past. How are you supposed to create a multi-line Sales Order if you don’t know the Sales Order Number that it created for you? Any item that has a parent-child relationship and the parent ID is auto-generated causes this scenario. Purchase Orders, etc.

I believe 0 is correct, it uses the PONum field and looks for a change there to know that it needs to create a new Sales Order.

Good to know, thanks!