Plug-in Implementation Script File Creation for SuiteScript 1.0

You can use the SuiteCloud IDE, or another JavaScript IDE or text editor, to create a JavaScript file that includes the business logic for your Custom GL Lines plug-in implementation script file.

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 must create an implementation of this function in the plug-in implementation script file. The script file can contain other helper functions. NetSuite executes this function when you save a transaction of the type and subsidiary configured for the plug-in implementation.

NetSuite executes this function one time for the primary accounting book. If you use the Multi-Book Accounting feature, this function is also called for each secondary accounting book that you configure 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 individual standard lines 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 modify 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 cannot modify the transaction.

When you create a new transaction in synchronous mode, the record ID is not 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