Hi,
I am having this error whenever I add new line in the sales order line - Cannot create a record in Order lines (SalesLine). Sales order: XXXXXXXX, XXXXXXXXXXX. The record already exists.
Although, I already set the LotID number sequence to continuous and manual clean up on sales order number sequence. I actually follow the resolution given in this link.