Since it makes no business sense to place an order with no line items, we implement the noEmptyOrder requirement using the following logic.
This example illustrates a number of Logic Patterns:
itemCount
indicates whether the order has any itemsThe last item bears some note. As explained in Commit validations, using a "regular" validation would have the effect that all orders are rejected. Not popular with the VP Sales. Since Commit Validations run after all the rows are processed, the itemCount
will reflect the Lineitems
(if any), so the logic will operate as intended.