Scenario
A user wants to review transaction line data and identify which items were used on transactions, along with the item name and quantity.
This is useful when creating a report or SuiteQL query that shows item-level transaction details, such as items sold, purchased, fulfilled, received, or otherwise referenced on transaction lines.
Return transaction lines where an item is present, including:
Information Needed | Description |
|---|
Transaction Internal ID | The internal ID of the transaction |
Item Internal ID | The internal ID of the item on the transaction line |
Item Name | The display name of the item |
Quantity | The quantity entered on the transaction line |
Solution
Use the transactionline table to retrieve item-level details from transaction lines.
SuiteQL Query
SELECT
transactionline.transaction,
transactionline.item AS item_id,
BUILTIN.DF(transactionline.item) AS item_name,
transactionline.quantity
FROM
transactionline
WHERE
transactionline.item IS NOT NULL
The query retrieves transaction lines that contain an item.
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.