Accounting Book

When the Multi-Book Accounting feature has been enabled, you can use the accounting book record to create secondary books.

For help working with this record in the UI, see Using Multi-Book Accounting.

In the UI, you access the accounting book record at Setup > Accounting > Accounting Books > New.

The internal ID for this record is accountingbook.

See the SuiteScript Records Browser for all internal IDs associated with this record.

Note:

For information about using the SuiteScript Records Browser, see Working with the SuiteScript Records Browser in the NetSuite Help Center.

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

Supported Script Types

The accounting book record is supported in server SuiteScript only.

All three user events are supported: beforeLoad, beforeSubmit, and afterSubmit.

Supported Functions

This record is partially scriptable — it can be created, updated, deleted, and searched using SuiteScript.

Code Samples

The following samples show how to create accounting book records and perform other basic tasks.

          // Create Record
var myACBook = record.create({
    type: record.Type.ACCOUNTING_BOOK
});
myACBook.setValue({
    fieldId: 'name',
    value: 'test'
});

var subs = new Array();
subs[0] = '1';
subs[1] = '3';
subs[2] = '5';

myACBook.setValue({
    fieldId: 'subsidiary',
    value: subs
});
myACBook.setValue({
    fieldId: 'isprimary',
    value: true
});

var recCreated = myACBook.save();

var id = 0;

// Update Record
var myACBook = record.load({
    type: record.Type.ACCOUNTING_BOOK,
    id: '3'
});

var subs = new Array();
subs[0] = '1';
subs[1] = '3';
subs[2] = '5';

myACBook.setValue({
    fieldId: 'subsidiary',
    value: subs
});
myACBook.setValue({
    fieldId: 'isprimary',
    value: true
});

var recUpdated = myACBook.save();

var id = 0;

// Delete Record
var delrecId = record.delete({
    type: record.Type.ACCOUNTING_BOOK,
    id: '2'
}); 

        

Related Topics

General Notices