transaction.Type

Note:

The content in this help topic pertains to SuiteScript 2.0.

Enum Description

Holds the string values for supported transaction record types.

Note:

JavaScript does not include an enumeration type. The SuiteScript 2.0 documentation utilizes the term enumeration (or enum) to describe the following: a plain JavaScript object with a flat, map-like structure. Within this object, each key points to a read-only string value.

Supported Script Types

Client and server scripts

For more information, see SuiteScript 2.x Script Types.

Module

N/transaction Module

Since

2015.2

Note:

For transaction types that use direct void, you must disable the Void Transactions Using Reversing Journals feature in your account to avoid an error being thrown. To disable this feature, go to Setup > Accounting > Preferences > Accounting Preferences.

Values

Transaction Record

Supported Void Type

ASSEMBLY_BUILD

None

ASSEMBLY_UNBUILD

None

BIN_TRANSFER

None

BIN_WORKSHEET

None

BLANKET_PURCHASE_ORDER

None

CASH_REFUND

Direct Void

CASH_SALE

Direct Void

CHECK

Void by Reversing Journal

CREDIT_CARD_CHARGE

None

CREDIT_CARD_REFUND

None

CREDIT_MEMO

Direct Void

CUSTOMER_DEPOSIT

Direct Void

CUSTOMER_PAYMENT

Direct Void

CUSTOMER_PAYMENT_AUTHORIZATION

None

CUSTOMER_REFUND

Direct Void and Void by Reversing Journal

CUSTOM_TRANSACTION

Void by Reversing Journal

DEPOSIT

None

DEPOSIT_APPLICATION

None

ESTIMATE

Direct Void

EXPENSE_REPORT

Direct Void

FULFILLMENT_REQUEST

None

INBOUND_SHIPMENT

None

INVENTORY_ADJUSTMENT

None

INVENTORY_COST_REVALUATION

None

INVENTORY_COUNT

None

INVENTORY_STATUS_CHANGE

None

INVENTORY_TRANSFER

None

INVOICE

Direct Void

ITEM_FULFILLMENT

None

ITEM_RECEIPT

None

JOURNAL_ENTRY

Direct Void

OPPORTUNITY

None

ORDER_RESERVATION

None

PAYCHECK

None

PAYCHECK_JOURNAL

Direct Void

PERIOD_END_JOURNAL

None

PURCHASE_CONTRACT

None

PURCHASE_ORDER

None

PURCHASE_REQUISITION

None

RETURN_AUTHORIZATION

Direct Void

REVENUE_ARRANGEMENT

None

REVENUE_COMMITMENT

None

REVENUE_COMMITMENT_REVERSAL

None

SALES_ORDER

Direct Void

STORE_PICKUP_FULFILLMENT

None

TRANSFER_ORDER

Direct Void

VENDOR_BILL

Direct Void

VENDOR_CREDIT

Direct Void

VENDOR_PAYMENT

Direct Void and Void by Reversing Journal

VENDOR_PREPAYMENT

Direct Void and Void by Reversing Journal

VENDOR_PREPAYMENT_APPLICATION

Direct Void and Void by Reversing Journal

VENDOR_RETURN_AUTHORIZATION

Direct Void

WAVE

Direct Void

WORK_ORDER

Direct Void

WORK_ORDER_CLOSE

Direct Void

WORK_ORDER_COMPLETION

Direct Void

WORK_ORDER_ISSUE

Direct Void

Syntax

Important:

The following code sample shows the syntax for this member. It is not a functional example. For a complete script example, see N/transaction Module Script Sample.

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

          

Related Topics

N/transaction Module
SuiteScript 2.x Modules
SuiteScript 2.x

General Notices