eblackey
05/24/2021, 9:05 PMsearch.create({
                type: search.Type.SALES_ORDER,battk
05/24/2021, 9:23 PMeblackey
05/25/2021, 11:20 AMvar orderSearch = search.create({
                type: search.Type.SALES_ORDER,
                columns: [
                    'entity',
                    'status',
                    'trandate',
                    'tranid',
                    'amountremaining',
                    'amountpaid',
                    'total',
                    'internalid'
                ],
                filters: [
                   ['mainline','IS','T'],
                    'and',
                     ['billaddress','CONTAINS','joanna'],
                      'or',
                     ['shipaddress','CONTAINS','joanna']
                ]
            }).run().getRange({start:0, end: 100});eblackey
05/25/2021, 11:22 AMbattk
05/25/2021, 11:33 AMbattk
05/25/2021, 11:33 AMeblackey
05/25/2021, 11:43 AM{
  "type": "salesorder",
  "id": -1,
  "filters": [
    {
      "name": "mainline",
      "operator": "IS",
      "values": [
        "T"
      ],
      "isor": false,
      "isnot": false,
      "leftparens": 0,
      "rightparens": 0
    },
    {
      "name": "billaddress",
      "operator": "CONTAINS",
      "values": [
        "joanna"
      ],
      "isor": true,
      "isnot": false,
      "leftparens": 0,
      "rightparens": 0
    },
    {
      "name": "shipaddress",
      "operator": "CONTAINS",
      "values": [
        "joanna"
      ],
      "isor": false,
      "isnot": false,
      "leftparens": 0,
      "rightparens": 0
    }
  ],
  "columns": [
    {
      "name": "entity",
      "join": null,
      "summary": null,
      "label": null,
      "type": null,
      "function": null,
      "formula": null,
      "sortdir": "NONE",
      "whenorderedby": null,
      "whenorderedbyjoin": null,
      "whenorderedbyalias": null
    },
    {
      "name": "status",
      "join": null,
      "summary": null,
      "label": null,
      "type": null,
      "function": null,
      "formula": null,
      "sortdir": "NONE",
      "whenorderedby": null,
      "whenorderedbyjoin": null,
      "whenorderedbyalias": null
    },
    {
      "name": "trandate",
      "join": null,
      "summary": null,
      "label": null,
      "type": null,
      "function": null,
      "formula": null,
      "sortdir": "NONE",
      "whenorderedby": null,
      "whenorderedbyjoin": null,
      "whenorderedbyalias": null
    },
    {
      "name": "tranid",
      "join": null,
      "summary": null,
      "label": null,
      "type": null,
      "function": null,
      "formula": null,
      "sortdir": "NONE",
      "whenorderedby": null,
      "whenorderedbyjoin": null,
      "whenorderedbyalias": null
    },
    {
      "name": "amountremaining",
      "join": null,
      "summary": null,
      "label": null,
      "type": null,
      "function": null,
      "formula": null,
      "sortdir": "NONE",
      "whenorderedby": null,
      "whenorderedbyjoin": null,
      "whenorderedbyalias": null
    },
    {
      "name": "amountpaid",
      "join": null,
      "summary": null,
      "label": null,
      "type": null,
      "function": null,
      "formula": null,
      "sortdir": "NONE",
      "whenorderedby": null,
      "whenorderedbyjoin": null,
      "whenorderedbyalias": null
    },
    {
      "name": "total",
      "join": null,
      "summary": null,
      "label": null,
      "type": null,
      "function": null,
      "formula": null,
      "sortdir": "NONE",
      "whenorderedby": null,
      "whenorderedbyjoin": null,
      "whenorderedbyalias": null
    },
    {
      "name": "internalid",
      "join": null,
      "summary": null,
      "label": null,
      "type": null,
      "function": null,
      "formula": null,
      "sortdir": "NONE",
      "whenorderedby": null,
      "whenorderedbyjoin": null,
      "whenorderedbyalias": null
    }
  ],
  "settings": null,
  "title": null,
  "scriptId": null,
  "isPublic": false,
  "packageId": null
}eblackey
05/25/2021, 11:46 AMconst salesorderSearch = search.create({
  type: 'salesorder',
  filters: [
    ['type', 'anyof', 'SalesOrd'],
    'AND',
    ['mainline', 'is', 'T'],
    'AND',
    [
      ['billaddress', 'contains', 'Joanna'],
      'OR',
      ['shipaddress', 'contains', 'Joanna'],
    ],
  ],battk
05/25/2021, 11:48 AMbattk
05/25/2021, 11:48 AMbattk
05/25/2021, 11:51 AMeblackey
05/25/2021, 11:51 AMeblackey
05/25/2021, 11:52 AMbattk
05/25/2021, 11:57 AMbattk
05/25/2021, 11:57 AMeblackey
05/25/2021, 11:59 AMeblackey
05/25/2021, 1:30 PMeblackey
05/25/2021, 1:31 PMbattk
05/25/2021, 1:42 PM