Custom GL Lines Plug-ins as XML Definitions

You can create or import Custom GL Lines plug-in implementations using SuiteCloud Development Framework (SDF). You can create or import Custom GL Lines plug-in implementations in a SuiteCloud project to modify the general ledger impact of standard and custom transactions. The Custom GL Lines Plug-in enables you to comply with a wide range of global accounting standards by applying custom transaction logic that adds lines to the NetSuite GL Impact page. The Custom GL Lines Plug-in can set and read custom segment values from custom and standard lines, and from transaction records. The default values for column segments are sourced from the body. The Custom GL Lines Plug-in can change this value, even for segments that are applied only to the body.

For information about how Custom GL Lines plug-ins are used, see Custom GL Lines Plug-in Overview.

You can create and manage a Custom GL Lines plug-in implementation in a SuiteCloud project and deploy it to a target NetSuite account. You can also import a Custom GL Lines plug-in implementation from a NetSuite account into a SuiteCloud project. For more information about importing objects, see Account Component Imports to SuiteCloud Projects.

Customizing a Custom GL Lines plug-in implementation object from your SuiteCloud project is the equivalent of editing or making a new Custom GL Lines plug-in implementation from the NetSuite UI. For example, select Customization > Plug-ins > Plug-in Implementation > New from a NetSuite account.

The following is a screenshot of a Custom GL Lines plug-in implementation record in the NetSuite UI:

Custom GL Lines Plug-in Plug-In Implementation page.

Custom GL Lines plug-in implementations in SDF are represented with the <customglplugin> object. To define this object, see the following sections:

Create a Plug-in Implementation Script File

You need to have a Custom GL Lines plug-in implementation script either in a NetSuite account, or in the same SuiteCloud project as your XML object. For more information, see Plug-in Implementation Script File Creation and SuiteScript Files in SuiteCloud Projects.

Custom GL Lines Plug-in Implementation Required Fields

The following table contains elements that are required for customglplugin objects. For a list of all available elements, see the reference documentation for the customglplugin element in SuiteCloud Development Framework XML Reference.

Element

Type

Description

customglplugin

single-select list

The element that defines the Custom GL Lines plug-in implementation object. This element requires a unique scriptid attribute value that defines the object.

Note:

The scriptid attribute is required for the customglplugin element. The scriptid attribute value must match the filename excluding the file extension.

name

string

A user-friendly name for the Custom GL Lines plug-in implementation. The name is seen by administrators when they activate or deactivate the Custom GL Lines plug-in implementation.

scriptfile

filereference

The script file (.js) that contains the implementation for the Custom GL Lines plug-in.

status

single-select list

The status of the custom plug-in type. Possible values are RELEASED and TESTING. Ensure the value is set to RELEASED prior to bundling the Custom GL Line plug-in. See Bundle the Plug-in Implementation.

The Libraries (Scripts) Structure

The <customglplugin> object contains a <libraries> structure to represent the script subrecord.

Element

Type

Description

libraries

structure

This structure contains all the utility script files or supporting library files that your plug-in implementation script file requires to run.

library

structure

This structure represents a single utility script file or supporting library file. You can specify multiple library structures.

scriptfile

filereference

This element takes a file path reference to a utility script file or supporting library file.

For example:

                      <customglplugin scriptid="customscript_customglplugin">
      ...
      <libraries>
         <library>
            <scriptfile>[/SuiteScripts/utilityScript.js]</scriptfile>
         </library>
      </libraries>
      ...
</customglplugin> 

                    

Files in the SuiteBundles and SuiteScripts folders of your File Cabinet can be selected as library files.

Custom GL Lines Plug-in Implementation Object Example

The following is an XML definition example of an Email Capture plug-in implementation object in a SuiteCloud project.

The Email Capture plug-in implementation object, customscript_emailcaptureplugin, creates a new plug-in that is in TESTING status. Debugging messages are logged when the script is run. The owner of the object is notified whenever an error is thrown. The customscript_emailCapturePlugin.js script is called when NetSuite receives an email sent to an email address associated with the Email Capture plug-in implementation.

            <customglplugin scriptid="customscript_emailCapturePlugin">
    <name>Custom GL Lines plug-in</name>
    <description></description>
    <status>TESTING</status>
    <loglevel>DEBUG</loglevel>
    <isinactive>F</isinactive>
    <notifyadmins>F</notifyadmins>
    <notifyemails></notifyemails>
    <notifyowner>T</notifyowner>
    <notifyuser>F</notifyuser>
    <runasrole></runasrole>
    <scriptfile>[/SuiteScripts/customscript_emailCapturePlugin.js]</scriptfile>
</customglplugin> 

          

For more information, see customglplugin element in SuiteCloud Development Framework XML Reference.

Related Topics

Plug-ins
Custom Plug-ins as XML Definitions
Email Capture Plug-ins as XML Definitions
Financial Institution Connectivity Plug-ins as XML Definitions
Financial Institution Parser Plug-ins as XML Definitions
Bank Statement Parser Plug-ins as XML Definitions
Dataset Builder Plug-ins as XML Definitions
Workbook Builder Plug-ins as XML Definitions

General Notices