Hello, has anyone observed the following issue and...
# suiteql
i
Hello, has anyone observed the following issue and how it was solved? For one of our clients in SB and PROD, the query
select * from TransactionAccountingLine where transaction = xxx and transactionline = 1
doesn't return anything. However, the same query for another client (same NetSuite (Edition: International) Release 2025.2) works. If I remove the condition for trasnactionline=1, all rows are displayed. If I join
TransactionAccountingLine
with
TransactionLine
and use a condition
TransactionLine.id=1
only one row is returned (what I expected too see) Problem with
TransactionAccountingLine
occurred this week, 2-3 weeks ago it was fine... Thanks :)
b
what do your joins look like?
i
Hi Brayan, I need to know the first debited account in a vendor bill. So I'm using a simple query:
select accounttype, account, recordtype
from TransactionAccountingLine tal
join transaction t on t.id=tal.transaction
where transactionline=1
and recordtype  in ('vendorbill')
and transaction = ${currentvendorbill}
// it doesn't work even if I use
transactionline='1'
It's weird, but following one works
select * from
(select TO_NUMBER(transactionline ) as num , *
from TransactionAccountingLine tal
where transaction=1049822)
where num=1
b
Copy code
SELECT accounttype
	,account
	,recordtype
	,tl.id
FROM TRANSACTION t
INNER JOIN transactionLine tl ON tl.TRANSACTION = t.id
INNER JOIN transactionaccountingline tal ON t.id = tal.TRANSACTION
	AND tal.transactionline = tl.id
WHERE t.recordtype = 'vendorbill'
	AND t.id = 111471
	AND tl.id = 1
I would do it this way. Also worth noting that the first line on a transaction is actually 0, not 1.
🙏 1
You apparently can't filter by tal.transactionline so you have to join to the transactionline and then pull the id
i
Thank you, Bryan 🙂
1