SAP Cloud Platform Open Connectors

How Can You Search For Nested or Non-Queryable Field Values?

Even though the Netsuite APIs do have some limitations around which fields can be queried, we identified this work-around.

You can create a Saved Search in Netsuite and then reference the savedSearchId in your query. For example with a custbody field where the data/value is stored in the array customFieldList: {customField: [] it cannot be directly queried through the NetSuite APIs.

  1. Access NetSuite, hover over Reports, and click New Search.
  2. Select Transaction.
  3. Add these filers:
    • Type -> is Invoice
    • custbody field name -> is 'value' (in this case the string value in my custbody field is the word "Terminator")
  1. Click Create Saved Search, enter  a Search Title, and then save the search filter.
  2. Hover over Reports -> Saved Searches -> and select All Saved Searches. Note the Internal ID of your new search (e.g. 734).
  3. Using SAP Cloud Platform Open Connectors make a GET /invoices request where savedSearchId = 734.
  4. Confirm that your desired invoices are present in the results based on the value defined in your NetSuite saved search.

Note that when you query based on savedSearchId you cannot append any additional qualifiers in the Where clause (such as tranId='INV00000001') so this workaround will not be successful for all use cases, but it does provide one option to get around the Netsuite query limitations.