As an Administrator, you will often need to dig into transactions to verify which items were included — whether for troubleshooting, auditing, or reporting purposes. While you can check this directly in the NetSuite UI, doing so one transaction at a time can be time-consuming.
SuiteQL offers a faster, more flexible way to extract this information. By writing a simple query, you can pull the exact list of items tied to a specific transaction, making it much easier to validate data, prepare reports, or share details with other teams.
Here’s an example query that finds items on a given transaction:
SELECT
TransactionLine.Transaction as TransactionID,
BUILTIN.DF(TransactionLine.item) as TransactionItem,
TransactionLine.itemtype as TransactionType
FROM TransactionLine
LEFT JOIN Item ON (TransactionLine.item = item.id)
where TransactionLine.Transaction = 18442 //transaction ID
AND TransactionLine.item IS NOT NULL
- TransactionLine.Transaction - Returns the internal ID of the transaction.
- BUILTIN.DF(TransactionLine.item) - Shows the item’s display name (instead of just the internal ID).
- TransactionLine.itemtype - Displays the type of item (e.g., Inventory Item, Non-Inventory).
- FROM TransactionLine - Gets all lines (items) that belong to a transaction.
- LEFT JOIN Item - Pulls additional details from the Item record by matching the transaction line item to its item ID.
- TransactionLine.Transaction = 18442 - Filters the results to only show items from transaction ID 18442.
- TransactionLine.item IS NOT NULL - Ensures only valid items are included (ignores empty or system-generated lines, like subtotals or discounts).
To easily execute a SuiteQL query, see NetSuite Admin Tip | Running SUITEQL Using a Suitelet
The sample code described herein is provided on an "as is" basis, without warranty of any kind, to the fullest extent permitted by law. Oracle + NetSuite Inc. does not warrant or guarantee the individual success developers may have in implementing the sample code on their development platforms or in using their own Web server configurations.
Oracle + NetSuite Inc. does not warrant, guarantee or make any representations regarding the use, results of use, accuracy, timeliness or completeness of any data or information relating to the sample code. Oracle + NetSuite Inc. disclaims all warranties, express or implied, and in particular, disclaims all warranties of merchantability, fitness for a particular purpose, and warranties related to the code, or any service or software related thereto.
Oracle + NetSuite Inc. shall not be liable for any direct, indirect or consequential damages or costs of any type arising out of any action taken by you or others related to the sample code.
We’d love to hear how you integrate SuiteQL into your NetSuite processes! Share your insights and experiences in the NetSuite Admin Corner.