As an Administrator, you may sometimes need to identify which items are actively being used in transactions—and which ones are not. Doing this directly from the UI can be time-consuming, especially if you have a large item catalog. SuiteQL provides a faster way to analyze this data.
By using a RIGHT JOIN between the Item and TransactionLine tables, you can list all items in your account and check whether they have ever appeared in a transaction.
SuiteQL Query
SELECT
item.itemid AS item_name,
item.displayname AS item_display,
transactionLine.transaction AS transaction_number
FROM transactionLine
RIGHT JOIN item
ON transactionLine.item = item.id
ORDER BY item.itemid
How It Works
- RIGHT JOIN - Ensures that every item in your account is included, even if it has no Transactions.
- item.itemid - The unique Item Name/Number.
- item.displayname - The Display Name of the Item.
- transactionLine.transaction - The Internal ID of a Transaction where the Item was used (will show NULL if unused).
- ORDER BY item.itemid - Organizes the results alphabetically or numerically by Item ID.
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.