Is there anywhere in the DB that links a transacti...
# suitescript
c
Is there anywhere in the DB that links a transaction to an account? I looked through the transaction table but don't see anywhere an account is stored This is on netsuite2.com
d
I did it through transactionline: INNER JOIN account ON TL.expenseaccount = account.id
c
I'll try to twist that into our usecase but it looks crazy
I can't even find the expenseaccount column on the transactionline
Although that's specifically for expense lines which won't work more broadly.
Looks like it should be there.
g
expenseaccount on transactionline should be what you are after. mainline = T for header level stuff. At least in suiteql anyway. I think the new records catalog is more accurate for tables/columns.
c
@Geo Why would mainline matter at the table level? I'd also say you want the connect browser instead of the record browser when you're using JDBC/ODBC.
g
Isn't netsuite2 is just suiteql more or less? The records browser is the new connect browser from my understanding. If you look at a single transaction id = 1234 or transactionline transaction = 1234. The transaction table should only return 1 record where the transactionline table will return at least two, one mainline T and one mainline F for each transactionline. Unless JDBC/ODBC is completely different.
c
Copy code
select * from Transactionline where transaction = 4132581
returns one row per line on the transaction.
1
I'm looking at a journal entry with five lines (rows) but there is no column/field that links to the account - I can see the account column in NS UI though so I'm not sure how they're doing this?
and there is no column called 'expenseaccount'
I figured it out. The accounts are on the transactionaccountingline table and required joining via the transaction id
💯 1