Adding the Default Implementation to NetSuite

To add a default implementation to NetSuite, you create a Custom Plug-in Type. A Custom Plug-in Type is a record type within NetSuite that encapsulates a custom plug-in’s default implementation and any supporting library files. Attach the default implementation’s JavaScript file to the Custom Plug-in Type record to save the record. See Creating a Custom Plug-in Default Implementation before performing the steps below.

Important:

You must have Server SuiteScript enabled and SuiteScript permission to create a custom plug-in type record.

Note:

Alternate implementations are also encapsulated with a record type in NetSuite, the New Plug-in Implementation record. The New Plug-in Implementation record is a child record to the Custom Plug-in Type record.

To create a custom plug-in type:

  1. Go to Customization > Plug-ins > Custom Plug-in Types > New.

  2. Select the script file that contains your default implementation, and then click Create Custom Plug-in Type.

  3. On the custom plug-In type record, enter the following:

    • Name: Provide a user-friendly name for the custom plug-in type. This name is seen by solution implementors creating alternate implementations of the plug-in type. It is also seen by administrators enabling/disabling implementations of this type.

    • ID: Provide an internal ID for the custom plug-in type. If you do not provide an ID, NetSuite provides one for you after you click Save.

    • Class Name (SuiteScript 1.0 scripts only): Provide a class name to represent the custom plug-in. Format the class name in Pascal case (PascalCase). You, the solution developer, use the class name to instantiate the implementation you want to use in your custom plug-in script. It is important that you enter a descriptive class name (for example, DemoPlugInType). See Instantiating a Custom Plug-in Implementation for additional information.

      Note:

      The term “class name” is a misnomer. When you create a new instance of an implementation in your custom plug-in script, you are instantiating a delegate, not an object.

    • Deployment Model: Specify how many custom plug-in type implementations an administrator can activate at one time.

      Important:

      The Deployment Model setting you choose affects how you write your custom plug-in script. See Instantiating a Custom Plug-in Implementation for additional information.

      The Deployment Model field provides the following options:

      • Allow Multiple: indicates multiple implementations of the interface can be activated at the same time within an account.

      • Allow Single: indicates only one implementation of the interface can be activated at any time within an account.

      Note:

      The Deployment Model field does not define how many implementations a custom plug-in can have. If this field is set to Allow Single, the custom plug-in can still have an unlimited number of alternate implementations. However, only one implementation can be activated at any time.

    • Status: Set to either Testing or Release. Be sure to set the status to Released before performing the steps in Bundling a Custom Plug-in.

    • Log Level: Set to the appropriate logging level you want for the custom plug-in script.

    • Description: If you choose, provide a brief description of what the custom plug-in does.

    • Owner: This field defaults to the name of the logged in user.

    • Inactive: Set whether you want the custom plug-in type to be active or inactive.

    • On the Methods tab, add the names of the functions defined in the interface. Only enter the function name. Do not enter parentheses or parameters.

    • On the Scripts tab, add the following:

      • Default Implementation (SuiteScript 1.0 scripts only): Browse to the default implementation’s JavaScript file. The lists only shows JavaScript files uploaded to the SuiteScript folder in the NetSuite File Cabinet. You can, however, also attach your .js file from a local directory or by URL.

      • Documentation: Add documentation written for your default implementation here. You should write an interface definition describing the functions defined in your interface. Solution implementors need this information to create alternate implementations.

      • Libraries (SuiteScript 1.0 scripts only): Add library files that support your alternate implementation here.

    • On the Unhandled Errors tab: Define which individual(s) will be notified if script errors occur. Note that notification is based on the errors that occur in your (the solution provider's) account. You are not going to be notified of errors that may occur in the accounts of those who install your custom plug-in.

  4. Click Save.

Note:

You can use SuiteCloud Development Framework (SDF) to manage default custom plug-in implementations as part of file-based customization projects. For information about SDF, see SuiteCloud Development Framework.

You can use the Copy to Account feature to copy an individual default custom plug-in implementation to another of your accounts. When you edit a default custom plug-in implementation, a clickable Copy to Account option is available in the upper right corner. For information about Copy to Account, see Copy to Account.

Related Topics

Custom Plug-in Overview
Custom Plug-in Development
Creating a Custom Plug-in Interface
Creating a Custom Plug-in Default Implementation
Instantiating a Custom Plug-in Script in SuiteScript 2.x
Instantiating a Custom Plug-in Script in SuiteScript 1.0
Adding a Script that Instantiates a Custom Plug-in to NetSuite
Bundling a Custom Plug-in
Custom Plug-in Creation
Creating a Custom Plug-in Alternate Implementation

General Notices