Suite Utils
Back to blog
NetSuite TipsSep 28, 2026 • 4 min read

NetSuite Saved Search: Compare Header vs Line Location

Sales orders with cross-subsidiary fulfillment often carry a header-level location that differs from the line-level inventory location.

Suite UtilsHow we write these guides
NetSuite Saved Search: Compare Header vs Line Location
On this page

Sales orders with cross-subsidiary fulfillment often carry a header-level location that differs from the line-level inventory location. That mismatch creates fulfillment errors, incorrect cost allocation, and intercompany elimination problems. A single saved search can flag these discrepancies in real time without exporting to Excel.

Why the Standard Approach Falls Short

When you filter a transaction search to Main Line = True, NetSuite returns only the header row. When you filter to Main Line = False, you get only line items. The two rows never appear together, so a simple formula column cannot reference both values simultaneously. The workaround, two searches, a VLOOKUP, and an IF formula, works once but breaks down for dashboard reminders that need to refresh automatically.

The Formula Column Technique

Create one transaction saved search (Type: Sales Order) with Main Line = False on the Criteria tab. This returns every line item row. Then use a formula column to pull the header location onto each line row for comparison.

Step-by-Step Build

  1. Navigate to Reports > Saved Searches > All Saved Searches > New > Transaction Saved Search.
  2. Criteria tab:
  • Type = Sales Order
  • Main Line = False
  • Status = Sales Order:B (Pending Fulfillment), adjust as needed
  • Add any subsidiary or date filters your dashboard requires
  1. Results tab, add these columns in order:
ColumnLabelFormula (Formula (Text))Summary Type
1Document Number{tranid}Group
2Line{line}Group
3Item{item}Group
4Header Location{location}Group
5Line Location{inventorylocation}Group
6Location MismatchCASE WHEN {location} <> {inventorylocation} THEN 'MISMATCH' ELSE 'OK' ENDGroup
  1. Highlighting (optional): Edit the Location Mismatch column > Conditional Formatting > When "MISMATCH" > Background Red, Font White.

The header location ({location}) is available on every line row because NetSuite carries the main-line value down to each sub-line in the search result set. The line-level inventory location ({inventorylocation}) is native to the item sublist.

Field ID Reference

UI LabelField IDRecord Level
Location (header)locationTransaction header
Inventory Location (line)Transaction line (item sublist)
Main LinemainlineTransaction (boolean)

Interpreting Results

  • OK, Header and line locations match. Fulfillment will source from the expected location.
  • MISMATCH, The sales order header shows one location (e.g., "NY Warehouse") while the line item points to another (e.g., "CA Warehouse"). This order will either fail cross-subsidiary fulfillment routing or post inventory to the wrong subsidiary.

Add the search to a Dashboard Reminder with Available for Reminders enabled on the search. The reminder count shows only "MISMATCH" rows when you filter the reminder portlet to Location Mismatch = MISMATCH.

Common Variants

Include Subsidiary Context

Add {subsidiary} and {inventorylocation.subsidiary} as columns to see cross-subsidiary fulfillment at a glance. A mismatch where the header subsidiary differs from the line inventory location subsidiary is the highest-risk scenario.

Filter to Open Orders Only

On the Criteria tab, add:

  • Status = Sales Order:A (Pending Approval), Sales Order:B (Pending Fulfillment)
  • Or use Formula (Numeric) = CASE WHEN {status} IN ('SalesOrd:A','SalesOrd:B') THEN 1 ELSE 0 END = 1

Capture the Fulfillment Location Too

If you use Advanced Shipping or WMS, the actual fulfillment location may differ from both. Add the fulfillment location field to a separate item fulfillment search and join via {tranid}.

Limitations to Know

  • Journal Entries: The Main Line filter does not work on Journal Entry searches (per Oracle documentation). This technique applies to Sales Orders, Purchase Orders, Transfer Orders, and Invoices.
  • OneWorld Intercompany: If the header location belongs to Subsidiary A and the line inventory location belongs to Subsidiary B, the mismatch triggers an intercompany elimination entry at month-end. Flag these before period close.
  • Performance: On datasets over 50,000 open sales orders, add a date filter (e.g., Created Within Last 30 Days) to keep the reminder portlet responsive.

If mismatches persist after correcting the sales order, check:

  1. Default Inventory Location on the item record. On the item record, click the Purchasing/Inventory subtab.
  2. Location Assignment on the customer record (Financial tab > Default Location)
  3. Supply Chain Rules that may override line locations during allocation

The saved search catches the symptom. The root cause lives in master data or allocation rules, fix there, and the reminder count drops to zero.

Put these ideas to work.

Suite Utils builds small NetSuite utilities that fix the specific thing breaking your day. Each one runs as a native SuiteScript SuiteApp inside your account. No sales call, no onboarding.

Browse the utilities

Enjoyed this one?

Get NetSuite tips like this in your inbox. No spam. Practical guides only.

Keep reading