Netsuite suiteql how to get all available tables to query?

Viewed 29

I am using Postman and Netsuite's SuiteQL to query some tables. I would like to write two queries. One is to return all items (fulfillment items) for a given sales order. Two is to return all sales orders that contain a given item. I am not sure what tables to use.

The sales order I can return from something like this.

"q": "SELECT * FROM transaction WHERE Type = 'SalesOrd' and id = '12345'"

The item I can get from this.

"q": "SELECT * FROM item WHERE id = 1122"

I can join transactions and transactionline for the sale order, but no items.

"q": "SELECT * from transactionline tl join transaction t on tl.transaction = t.id where t.id in ('12345')"

The best reference I have found is the Analytics Browser, https://system.netsuite.com/help/helpcenter/en_US/srbrowser/Browser2021_1/analytics/record/transaction.html, but it does not show relationships like an ERD diagram.

What tables do I need to join to say, given this item id 1122, return me all sales orders (transactions) that have this item?

0 Answers
Related