Void a transaction using SuiteScript

Void a payment using N/transaction In NetSuite, the N/transaction module allows you to programmatically void transactions, such as payments or invoices. Using the void function, you can efficiently reverse the impact of a transaction. This is useful for handling corrections or cancellations directly within scripts. transaction.void({           type: transaction.Type.VENDOR_PAYMENT, // Make sure the preference ‘Void Transactions… Continue reading Void a transaction using SuiteScript

Void Transactions using N/transaction Module

Load the transaction module to void transactions. When you void a transaction, the total and all the line items for the transaction are set to zero. The transaction is not removed from the system. NetSuite supports two types of voids: direct voids and voids by reversing journal. The type of void performed with your script… Continue reading Void Transactions using N/transaction Module

Void Invoice When Void Transactions Using Reversing Journal box is checked

Scenario Under Setup > Accounting > Accounting Preferences > General Tab > General Ledger Section > When Void Transactions Using Reversing Journal box is checked, the Void Button is not available in the Invoice in Edit Mode.  Solution In order to reverse the G/L Impact of the Invoice and make the Sales Order available for billing again:  Open the Invoice that needs to be voided on Edit mode Remove and Add Line Item/s in concern on the Invoice Click Items Tab  Click Items Sublist Click to… Continue reading Void Invoice When Void Transactions Using Reversing Journal box is checked

Catch the Void Action Using a User Event Script

Scenario: Currently, Suitescript does not have the capability yet to catch the Void action on a record. However, we can check if a record is already voided in NetSuite. sample code if(scriptContext.type == “edit”){ var objRecordNew = scriptContext.newRecord; var internalID = scriptContext.newRecord.id var objRecord = record.load({ type: record.Type.PURCHASE_ORDER, id: internalID, isDynamic: true, }); var voided = objRecord.getValue({… Continue reading Catch the Void Action Using a User Event Script