netsuite Filtering only on Internal ID


Example

Let's explore an example Transaction search where we define a filter for a single transaction's internal ID:

Filter by Internal ID

We've specified a filter to only show us results for the Transaction with the internal ID of 875; here is that Transaction:

Example Sales Order

We can see it is a Sales Order with a single line item.

Because internal IDs are unique across all transactions, we can expect only one search result for this search. Here is the search result:

Unexpected Results

Instead of the single result we expect, we get four results. What's more, every result has exactly the same internal ID. How is that possible?

To understand what is happening here, we need to recall that data stored in NetSuite records is divided into two categories:

  1. Body Data: Data stored in standalone fields of the record (e.g. Date, Sales Rep, Document Number, Coupon Code)
  2. Sublist Data: Data stored in lists within each record, usually displayed on subtabs in the UI (e.g. Items on a Sales Order)

Transactions contain multiple sublists of data, including its:

  • line items
  • shipping information
  • tax information
  • COGS (Cost of Goods Sold) details

In these search results, NetSuite is actually showing us one result for the transaction body, then other results for data on the various sublists within that same transaction.

Notice the column in our search results simply named with an asterisk (*). Notice also that one of the results has an asterisk populated in this column while the rest are empty. This column indicates which search result represents the body of the transaction, which is also called the transaction's Main Line.

There are times when you will want transaction searches to only show the Main Line data, and times where you will only want the line-level detail. The remaining examples show how to control what shows up in our results.