Line Filters in SuiteScript

In addition to mainline there are several sublist line filters.

  • Main Line
  • Shipping Line
  • Tax Line
  • COGS Line

Here is what that same filter setup looks like in SuiteScript:

s.create({
  type: s.Type.SALES_ORDER,
  filters: [
    ['mainline', s.Operator.IS, false], 'and',
    ['taxline', s.Operator.IS, false], 'and',
    ['shipping', s.Operator.IS, false], 'and',
    ['cogs', s.Operator.IS, false]
  ]
}).runPaged().count

This Search will provide one result per Item line from every Sales Order in your account.

Leave a comment

Your email address will not be published. Required fields are marked *