Another SuiteQL question. I'm reading an Item Fulf...
# suitescript
s
Another SuiteQL question. I'm reading an Item Fulfillment and I want to get the PO. The PO is on the Sales Order (otherrefnum). I'm doing ... SELECT TransactionLine.Transaction, so.otherrefnum AS PO FROM TransactionLine INNER JOIN Transaction as IF_PARENT on (transaction.ID = transactionline.transaction) INNER JOIN Transaction as SO on (transaction.ID = ????????)
m
It's probably either
PreviousTransactionLineLink
or
PreviousTransactionLink
and you would need to look at link type. We don't use fulfillments in the account I have access to atm so can't try this out
FYI the new Records Catalog is really good way to figure out available fields and joins for SuiteQL
t
This is very rough, but it might help:
SELECT
Transaction.type,
Transaction.trandate,
Transaction.number,
Transaction.shippingaddress,
TransactionLine.item,
TransactionLine.quantity
FROM
PreviousTransactionLink
INNER JOIN Transaction ON
(Transaction.ID = PreviousTransactionLink.nextdoc)
INNER JOIN Transactionline ON
(Transactionline.transaction = Transaction.id)
WHERE
PreviousTransactionLink.previousdoc = 1317801
AND PreviousTransactionLink.linktype = 'ShipRcpt'
s
Want to say thank you . It's working. I didn't know about PreviousTransactionLink
t
Awesome!