Plug-in Implementation Script File Creation for SuiteScript 1.0

You can use the SuiteCloud IDE, or any JavaScript IDE or text editor, to create the JavaScript file with your business logic for the Custom GL Lines plug-in implementation.

The following table describes the functions and objects available in a Custom GL Lines plug-in implementation script file:

Function / Interface Object

Description

customizeGlImpact(transactionRecord, standardLines, customLines, book)

You'll need to create an implementation of this function in the plug-in script file. The script can contain other helper functions. NetSuite runs this function when you save a transaction of the type and subsidiary you set up for the plug-in implementation.

NetSuite runs this function one time for the primary accounting book. If you use Multi-Book Accounting, it also runs for each secondary accounting book you set up for the plug-in implementation.

StandardLines

Contains an array of all standard lines with GL impact in a transaction as StandardLine objects.

Use the methods available to this object to access the properties of each standard line with GL impact on a transaction.

CustomLines

Contains an array of all custom lines with GL impact in a transaction as CustomLine objects.

Use the methods available to this object to add and change custom lines with GL impact on a transaction.

AccountingBook

Represents the accounting book passed to a Custom GL 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.

Record

Use this to access properties of the transaction with SuiteScript API nlobjRecord functions. You can't modify the transaction.

When you create a new transaction in synchronous mode, the record ID isn't available.

For more information, see the Custom GL Lines Plug-in Process Flow and Custom GL Lines Plug-in Implementation Object Model for SuiteScript 1.0.

Custom GL Lines Plug-in Implementation Object Model for SuiteScript 1.0

The following diagram shows the object model for the interface input and output objects:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 

Rules and Guidelines

Use the following rules and guidelines when creating the plug-in implementation script file:

Important:

For additional guidelines and best practices, see Custom GL Lines Plug-in Guidelines and Best Practices.

Related Topics

General Notices