NetSuite SuiteQL Query List
To Fetch Units of Measure Details use following query:
"SELECT * FROM unitstypeuom JOIN unitstype ON unitstypeuom.unitstype =
unitstype.id
"
To Fetch Transaction Fields and Transaction line
"SELECT Transaction.TranID, Transaction.TranDate, TransactionLine.category, TransactionLine.transactionlinetype,TransactionLine.createdfrom, TransactionLine.item,TransactionLine.category FROM Transaction JOIN TransactionLine ON TransactionLine.Transaction =
Transaction.id
WHERE ( Transaction.TranDate BETWEEN TO_DATE( '2023-02-01', 'YYYY-MM-DD' ) AND TO_DATE( '2024-02-20', 'YYYY-MM-DD' ))"
o Fetch transaction fields, transaction line fields and expense account from vendor bill record use following query.
"SELECT expenseCategory.expenseacct, Transaction.TranID, Transaction.TranDate, TransactionLine.category, TransactionLine.transactionlinetype,TransactionLine.createdfrom, TransactionLine.item,TransactionLine.category FROM Transaction JOIN TransactionLine ON TransactionLine.Transaction =
Transaction.id
JOIN expenseCategory ON
expenseCategory.id
= TransactionLine.category WHERE ( Transaction.TranDate BETWEEN TO_DATE( '2023-02-01', 'YYYY-MM-DD' ) AND TO_DATE( '2024-02-20', 'YYYY-MM-DD' ) AND (Transaction.Type ='VendBill') AND (
Transaction.ID
= 57552363) )"