I have the following query to pull item fulfillmen...
# general
w
I have the following query to pull item fulfillment records along with their statuses for a given sales order. How can I get the actual “refName” of the status. The status column returns “A”, “B”, “C” and I want “Picked” “Packed” “Shipped”
Copy code
def self.item_fulfillment(salesorder_id:)
    <<~STOP
      SELECT          Transaction.id, Transaction.status
      FROM            Transaction
      JOIN            TransactionLine
        ON TransactionLine.Transaction = Transaction.id
      WHERE           Transaction.Type = 'ItemShip'
      AND             TransactionLine.CreatedFrom = '#{salesorder_id}'
    STOP
  end
I can, of course, pull this id via SuiteQL and then pull the IF record by REST to get the decoded status but would rather pull it in query if possible.
m
BUILTIN.DF(transaction.status)
w
Thanks a million, @michoel!