Why do I keep getting results for transactions that do not meet my criteria on a saved search?

As a NetSuite consultant, whenever I build a NetSuite Saved Search, one of the most important things I consider is where the data I’m looking for lives. For example, a transaction is divided into two parts: the header (main line) and the body (aka line items). If I am searching for fields such as customer, date, or transaction number they might reside in the header information of the transaction. If the topic of the search is a field on the item grid, such as quantity ordered or tax code, that line item is part of the body. Separating these two concepts helps narrow down search results.

A quick way to look at this is that main line = T is only header info, main line = F are transaction lines, and main line = either is both. When you are looking at search results with both, the main line will have an (*) next to it.

I was faced with the task of finding all invoice line items missing department, class, and location. In this environment department, class, and location lived on the lines.

The criteria was:

Main line = False, Type = invoice, Department = unassigned, Class = unassigned, Location = unassigned

Looks easy enough, right? Not the case… and this is where the real trouble began. My saved search results were showing several transactions, but after drilling through to the underlying data and reviewing the transaction, nothing appeared to be missing – all of the lines that I could see in the line item grid had a Department, Class and Location!  I built the search over again thinking it was an error but the results remained the same.

Aha – and then it hit me!  In NetSuite, shipping, tax and costs of goods sold (COGS) are stored as separate line items – maybe this is what was throwing me off!  After all, each of these transactions did have shipping and tax, as well as an expense. I tried running the search again but I updated my criteria as follows:

Main line = False, Type = invoice, Department = unassigned, Class = unassigned, Location = unassigned

COGS line = No, Shipping line = No, Tax line = No

And what do you know, the results came out properly. The lesson here is to remember that in NetSuite, shipping, tax and COGS are stored as separate line items – therefore, you need to account for this when you’re building your saved searches, or you might get some wonky results.  Hopefully this post will save you a headache the next time you can’t make sense of your saved search results.

Need more help? MIBAR offers expert NetSuite support. Contact us today to learn more.

Additional NetSuite Resources

Creating a Save Search in NetSuite for Transactions with Related Records

NetSuite Saved Search Magic with Dynamic Drill Through