Modules

filter

 

Objects/Functions

module (N/transaction)

SuiteScript 2.0

transaction.void.promise(options)

// Please search https://system.netsuite.com/app/help/helpcenter.nl?search=transaction.void.promise(options) for more information.

N/transaction Module
transaction.void.promise()
Method Description: Method used to void a transaction record object asynchronously and return an ID that indicates the type of void performed: If a direct void is performed, this method returns the ID of the record that was voided. If a void by reversing journal is performed, this method returns the ID of the newly created voiding journal. The type of void performed depends on the targeted account’s preference settings. After you void a transaction, you cannot make changes to the transaction that impact the general ledger. The parameters and errors thrown for this method are the same as those for transaction.void(options). For more information on promises, see Promise Object.
Returns: Promise Object
Synchronous Version: transaction.void(options)
Supported Script Types: All client-side scripts For more information, see SuiteScript 2.0 Client Script Type.
Governance: 10 units
Module: N/transaction Module
Since: 2015.2
Search NetSuite - https://system.netsuite.com/app/help/helpcenter.nl?search=transaction.void.promise(options)

Example:

// Code Example 1
//Add additional code
//...
var voidSalesOrderId = transaction.void.promise({
type: record.Type.SALES_ORDER,
id: salesOrderId
});
//...
//Add additional code

//SOURCE: https://system.netsuite.com/app/help/helpcenter.nl?fid=section_4440850256.html