Anyone had success getting the wms wave attached t...
# suiteql
j
Anyone had success getting the wms wave attached to the sales order?
s
Link via TransactionLine.createdfrom. Example from a query I have (sotrx is the Transaction table for the sales order, wavtrx is the Transaction table for the wave, likewise for solin and wavlin):
Copy code
SELECT
  sotrx.TranID, wavtrx.TranID
FROM
  Transaction sotrx
  INNER JOIN TransactionLine solin ON solin.Transaction = sotrx.ID
  INNER JOIN TransactionLine wavlin ON solin.transaction = wavlin.createdfrom AND solin.item = wavlin.item
  INNER JOIN Transaction wavtrx ON wavlin.transaction = wavtrx.id
WHERE
  sotrx.Type = 'SalesOrd'
  AND wavtrx.Type = 'Wave'
j
Any way to get it not on the line level?
s
No, because that's where the link is. But you can do a DISTINCT and just select transaction-level fields if that's all you need.