Custom GL plugin setup

The Custom GL Lines Plug-in modifies the general ledger impact of standard and custom transactions. Use the Custom GL Lines Plug-in to comply with a wide range of global accounting standards by applying custom transaction logic that adds lines to the NetSuite GL Impact page.

configure for each plug-in implementation:

  • Transaction types. A Custom GL Lines plug-in implementation runs when you save a transaction for which the plug-in implementation is configured to run, where the entity for the transaction is associated with a specific subsidiary. You can include code in the plug-in implementation script file that applies only to specific transaction types.
  • Subsidiaries. In a One World account, the plug-in implementation only affects the general ledger entries for the subsidiaries that you configure for the plug-in implementation.
  • Accounting books. The plug-in implementation affects only the accounting books that you configure for the plug-in implementation. If you have the Multi-Book Accounting feature enabled, you can direct the plug-in implementation to modify existing or add custom general ledger entries in multiple accounting books. If you do not have the Multi-Book Accounting feature enabled, the plug-in implementation affects only the general ledger entries in the primary accounting book.
StepDescription
Enable featuresEnable the Custom GL Lines Plug-in and Server SuiteScript features.
Gather required internal IDsIn a plug-in implementation, you can reference internal NetSuite IDs for records and accounts. Before you create the plug-in implementation script file, you must note these values
Create script fileCreate the script file that contains the Custom GL Lines plug-in implementation.
Add the plug-in implementationAdd the plug-in implementation using the plug-in script file and any required utility files that you created in the previous step to the development account.
Test the plug–in implementationVerify the behavior of the plug-in implementation.
Bundle the plug-in implementationBundle both the plug-in implementation and other objects required by the plug-in implementation for distribution to other NetSuite accounts.

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

Function / Interface ObjectDescription
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.
StandardLinesContains 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.
CustomLinesContains 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.
Accounting BookRepresents 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.
RecordUse 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.

Leave a comment

Your email address will not be published. Required fields are marked *