Modules

filter

 

Objects/Functions

module (N/transaction)

SuiteScript 2.0

transaction.void(options)

{transaction}.void({id: {number | string*},type: {string*}})

N/transaction Module
transaction.void()
Method Description: Method used to void a transaction record object and return an id that indicates the type of void performed. 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.
Returns: An ID returned as a number. If a direct void is performed, returns the ID of the record voided. If a void by reversing journal is performed, returns the ID of the newly created voiding journal.
Supported Script Types: All client and server-side scripts For more information, see SuiteScript 2.0 Script Types.
Governance: 10 units
Module: N/transaction Module
Since: 2015.2
Search NetSuite - https://system.netsuite.com/app/help/helpcenter.nl?search=transaction.void(options)

Example:

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

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