Reputation: 845
In NetSuite's SuiteTalk how do I transform a record from a Sales Order to an Invoice? It looks like there is a function in SuiteScript, but I can't find anything similar in 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.
Upvotes: 0
Views: 1714
Reputation: 15437
SuiteTalk has an analogous initialize method. With the Java library you'd use it like:
ReadResponse initCS = nsClient.getPort().initialize(new InitializeRecord(InitializeType.cashSale, new InitializeRef(null, InitializeRefType.salesOrder, soId, null), null));
CashSale cs = (CashSale)initCS.getRecord();
Upvotes: 2