Balance Transactions by Segments

The balance transactions by segments record lets you select the criteria for transactions to include in the balancing by segments process. This process generates one or more balancing journals to balance the debits and credits of the included transactions by balancing segment.

This record and process are part of the Balancing Segments feature. For information, see Balancing Segments and Journals. The Custom Segments feature is a prerequisite for the Balancing Segments feature.

Before you begin working with this record programmatically, see Setup for Balancing Segments.

For help working with this record in the UI, see Balancing Transactions by Segment.

The internal ID for this record is balancetrxbysegments.

See the SuiteScript Records Browser for all internal IDs associated with this record. For information about using the SuiteScript Records Browser, see Working with the SuiteScript Records Browser.

For information about scripting with this record in SuiteScript, see the following help topics:

Supported Script Types

The balance transactions by segments record is scriptable in server SuiteScript only.

Supported Functions

The balance transactions by segments record is partially scriptable. You can create, read, and search it using SuiteScript. You cannot update, copy, transform, or delete it.

Usage Notes

The Transactions and Results subtabs, visible in the UI in view mode, are not scriptable.

Code Sample

The following sample shows how to run the balancing by segments process in a NetSuite OneWorld account with the Multi-Book Accounting feature enabled.

            /**
* @NApiVersion 2.x
*/
require(['N/record'], function(record) {
    var balancingTrxBySegments = record.create({
        type: record.Type.BALANCE_TRX_BY_SEGMENTS,
        isDynamic: true
    });
    balancingTrxBySegments.setValue({
        fieldId: 'accountingbook',
        value: [1, 2]
    });
    balancingTrxBySegments.setValue({
        fieldId: 'subsidiary',
        value: [3, 4]
    });
    balancingTrxBySegments.setValue({
        fieldId: 'includechildren',
        value: true
    });
    balancingTrxBySegments.setValue({
        fieldId: 'postingperiod',
        value: 64
    });
    balancingTrxBySegments.setValue({
        fieldId: 'memo',
        value: 'My Balancing'
    });
    balancingTrxBySegments.save();
}); 

          

Related Topics

Balancing Transactions by Segment
Working with the SuiteScript Records Browser
SuiteCloud Supported Records
Transactions

General Notices