darrenhillconsulting
08/27/2024, 7:54 PMCeligo AI
08/27/2024, 7:56 PMAI generated answer (using internal Slack threads):To join the Item Fulfillment Line back to its Sales Order Line using SuiteQL, you can use the
PreviousTransactionLink
or PreviousTransactionLineLink
tables. These tables contain the links between transactions in NetSuite.
Here is a rough example of how you can do this:
sql
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 = {Sales Order ID}
AND PreviousTransactionLink.linktype = 'ShipRcpt'
In this query, replace {Sales Order ID}
with the ID of the Sales Order you are interested in. The linktype
of 'ShipRcpt' is used to link Sales Orders to Item Fulfillments.
Please note that this is a rough example and you may need to adjust it to fit your specific needs.
******
Disclaimer:
This response was generated by an artificial intelligence assistant based on previous conversations from multiple Slack channels, and may contain inaccuracies or mistakes.
******Celigo AI
08/27/2024, 7:56 PMSlack thread 1: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.849557877
Slack thread 2: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.848522305
Slack thread 3: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.835621536
Celigo AI
08/27/2024, 7:56 PM