If we want to fetch linelevel details of invoice which is connected to sales order using suiteQL

49 Views Asked by At

Actually I am getting invoice details through the sales order but not getting details of linelevel data of invoice then my question is how to fetch this details using suiteql.

SELECT DISTINCT NTo.tranid AS 'invoice tranid' ,
FROM NextTransactionLineLink AS NTLLo 
INNER JOIN Transaction AS NTo ON NTo.ID = NTLLo.NextDoc
 WHERE NTLLo.PreviousDoc = t.id
 AND NTo.Type = 'CustInvc' `This is my query and I want item information using above details`

1

There are 1 best solutions below

0
Aniruddh Maitra On

I am sorry, I didn't get what the alias 't' is for here. " WHERE NTLLo.PreviousDoc = t.id " But if you want line level items, you will get that from the transactionline table. The join would look smth like this :

SELECT * FROM transaction 
LEFT JOIN transactionline 
ON transaction.id = transactionline.transaction