Get all of the quotes (with any necessary filters):
qs = api.find("Q", i, step, null, Filter.equal("quoteStatus", quoteStatus), Filter.equal("workflowStatus", workflowStatus), Filter.equal("customerId", customerId)) |
Iterate through each line item in each quote. Within each iteration, loop through the list of SKUs and compare it to the quote line item's SKU:
def quotes = [] if (skus) { for (q in qs) { for (li in q.lineItems) { if (skus.contains(li.sku)) { quotes.add(q) break } } } } |