does anyone know how to get the main account on a ...
# suiteql
m
does anyone know how to get the main account on a transaction or tell if the line is actually the main line one? On search there is the column accountmain but not one on suiteql. It can't be directly off the transactionline where mainline is T because account as journals are always mainline
a
Copy code
INNER JOIN transactionline as mainline on mainline.transaction = transactionline.transaction and mainline.mainline = 'T'
m
i'll still get T for journal entries. to me a journal is not main line as I can update the line. I need to run a check on lines that I can't update with SS
a
What field on which transaction type are you looking for?
m
i'm looking for the main account or true main line associated to all transactions and if there is no main account then the account would be null or the main line would be null.
I need to tag all lines as being processed but I can't tag lines that don't exist, (ex : vendor bill main line). I have to tag on the main body because I can't edit the line even though the line has a unique id
a
How about
transactionline.linesequencenumber=0
?
m
nope! sequence number of first journal line is still 0. i don't think it's possible. i'm working on figuring out a work around
a
I don't understand. There is no acctmain for journal entries?
m
right. but there is no way to tell besides checking the recordtype if the transaction actually has an accountmain and i don't know if a custom transaction would also have a main account. I think i'm going to just add a search lookup in the middle of my process to check if the line account is equal to the account main on the transaction. It returns null for a journal entry as I would expect