Posted on 20/09/2023 15:08:59
Hi Martin,
Nicolai's right.
The error can be thrown for the same number of reasons you'd get a validation error when entering an order in F&O manually. Maybe the customer is on hold or over their credit limit, maybe an item on the order is not eligible for purchase.
It's unusual for the order to successfully create later, though. Is the client being informed that there's a problem and they're fixing it?
To narrow the problem to the header vs line, you can throw an error if the validate method for either is unsuccessful, or similarly when checking for the existence of the customer or item.
Carolee