Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Current »

1) 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))

2) Get the sku or list of skus that you want to filter on

3) 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
      }
    }
  }
}

  • No labels