使用 SuiteTalk 将销售订单转换为发票

Transform a Sales Order into a Invoice with SuiteTalk

在 NetSuite 的 SuiteTalk 中,如何将记录从销售订单转换为发票?好像SuiteScript里有函数,但我在SuiteTalk里没找到类似的。

SuiteScript:

nlapiTransformRecord(type, id, transformType, transformValues)

Initializes a new record using data from an existing record of a different type and returns an nlobjRecord. This function can be useful for automated order processing such as creating item fulfillment transactions and invoices off of orders.

SuiteTalk 有一个类似的 initialize 方法。使用 Java 库,您可以像这样使用它:

        ReadResponse initCS = nsClient.getPort().initialize(new InitializeRecord(InitializeType.cashSale, new InitializeRef(null, InitializeRefType.salesOrder, soId, null), null));

        CashSale cs = (CashSale)initCS.getRecord();