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 holds 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 it. See Creating the Default Implementation for a Custom Plug-in 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 stored as a record type in NetSuite, called the New Plug-in Implementation record, which is a child record of 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: Enter a user-friendly name for the custom plug-in type. Solution implementers and administrators see this name when creating alternate implementations or enabling/disabling implementations.

    • ID: Enter an internal ID for the custom plug-in type. If you don't enter an ID, NetSuite creates one for you after you click Save.

    • Class Name (SuiteScript 1.0 scripts only): Enter a class name for the custom plug-in using Pascal case (PascalCase, for example, DemoPlugInType). As the solution developer, you'll use this class name to instantiate the implementation you want to use in your custom plug-in script. Make sure the class name is descriptive. For more information, see Instantiating a Custom Plug-in Implementation.

      Note:

      The term “class name” is misleading. 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 you choose affects how you write your custom plug-in script. For more information, see Instantiating a Custom Plug-in Implementation.

      The Deployment Model field provides the following options:

      • Allow Multiple: You can activate multiple implementations of the interface in an account at the same time.

      • Allow Single: You can activate only one implementation of the interface in an account at any time.

      Note:

      The Deployment Model field doesn't limit how many implementations a custom plug-in can have. If this field is set to Allow Single, you can still have as many alternate implementations as you want, but only one implementation can be activate at any time.

    • Status: Set to either Testing or Release. Be sure to set the status to Released before you bundle your custom plug-in. For more information, see Bundling a Custom Plug-in.

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

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

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

    • 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 from the interface. Enter the function name only without 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, but you can also attach your .js file from a local directory or by URL.

      • Documentation: Add documentation for your default implementation here. You should write an interface definition that describes the functions in your interface. Solution implementers 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: Specify who is notified if script errors occur. Note that you'll only get notifications for errors in your own (the solution provider's) account. You won't be notified of errors that 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 Copy to Account to copy an one default custom plug-in implementation to another of your accounts. When you edit a default custom plug-in implementation, you'll see a clickable Copy to Account option in the upper right corner. For information about Copy to Account, see Copy to Account.

Related Topics

General Notices