If the customer is anonymous, this method always returns zero. If an active data record is available for this customer, the orders count is retrieved from that record, otherwise a real-time query is used to get the count.
If the result exceeds 1000 orders, only the first 1000 orders are retrieved. Same as
orderHistory.getOrders( null, "creationDate DESC" )
It is strongly recommended to call SeekableIterator.close()
on the returned
SeekableIterator if not all of its elements are being retrieved. This will ensure the proper cleanup of system
resources.
If the customer is anonymous, this method always returns zero. If an active data record is available for this customer, the orders count is retrieved from that record, otherwise a real-time query is used to get the count.
If the result exceeds 1000 orders, only the first 1000 orders are retrieved. Same as
orderHistory.getOrders( null, "creationDate DESC" )
It is strongly recommended to call SeekableIterator.close()
on the returned
SeekableIterator if not all of its elements are being retrieved. This will ensure the proper cleanup of system
resources.
If the result exceeds 1000 orders, only the first 1000 orders are retrieved. Optionally, you can retrieve a subset of the orders by specifying a query. At maximum 3 expressions are allowed to be specified and no custom attribute expressions are allowed.
It is strongly recommended to call SeekableIterator.close()
on the returned
SeekableIterator if not all of its elements are being retrieved. This will ensure the proper cleanup of system
resources.
var orderHistory : dw.customer.OrderHistory = customer.getOrderHistory(); var orders = orderHistory.getOrders("status = {0}", "creationDate DESC", dw.order.Order.ORDER_STATUS_NEW); for each (var order : dw.order.Order in orders) { // ... process orders } orders.close();