从发票中识别销售订单 - suitescript 2.0

Identify sales order from an invoice - suitescript 2.0

是否有一种简单的方法来识别从中创建发票的销售订单?

我有一个 suitescript 在每次创建发票时执行,我想确定发票来自哪个销售订单,因为我需要销售订单中的字段值来确定发票流程的下一步。

感谢您的帮助。

可以得到字段ID的值'createdfrom'

有一个 salesInvoiced table 有 Transaction = CustInv 和 uniquekey = transactionLine.uniquekey