AccountingBook
Type |
Interface input object |
Description |
Represents the accounting book passed to a Custom GL Lines plug-in implementation when you save a transaction. Use the methods available to the book object to determine if the book is a primary or secondary book or get the internal NetSuite ID of the accounting book. If you use the Multi-Book Accounting feature, the AccountingBook object represents a different accounting book each time the plug-in implementation executes. For more information, see Custom GL Lines Plug-in Process Flow. |
Methods |
|
Child Object(s) |
n/a |
getId()
Function Declaration |
|
Type |
Object method |
Description |
Returns the internal NetSuite ID for the accounting book to be passed to a Custom GL Lines plug-in implementation. You can use this ID, for example, to load the accounting book record with the You can use this ID, for example, to define plug-in implementation functionality based on the accounting book ID, to load the record for the book with The type for an accounting book record is
Important:
Limit the use of these APIs, where possible, to improve performance of the plug-in implementation. Also, searching for a record results in better performance than loading the record. You can view the list of internal NetSuite IDs for accounting books at Setup > Accounting > Accounting Books. You can also use helper functions in a utility file to avoid adding the internal NetSuite IDs into the plug-in implementation logic. See Utility Files for a Custom GL Lines Plug-In Implementation. |
Returns |
int |
Input Parameters |
None. |
Parent object |
Example
function customizeGlImpact(transactionRecord, standardLines, customLines, book)
{
...
var bookId = book.getId();
if (!book.isPrimary())
{
var bookRec = nlapiLoadRecord('accountingbook',bookId);
...
}
...
}
isPrimary()
Function Declaration |
|
Type |
Object method |
Description |
Returns |
Returns |
boolean |
Input Parameters |
None. |
Parent object |
Example
function customizeGlImpact(transactionRecord, standardLines, customLines, book)
{
...
var bookId = book.getId();
if (book.isPrimary())
{
var bookRec = nlapiLoadRecord('accountingbook',bookId);
...
}
...
}