Creating a New Plug-in Implementation

The following is a generic procedure to create a new plug-in implementation in NetSuite. For details on how to create a new implementation for your specific core plug-in, see the applicable help topic listed under Available Core Plug-ins.

To create a plug-in implementation, you create the plug-in implementation script file. Then, you upload the script file and other utility files as required to create the plug-in implementation.

To create a new plug-in implementation:

  1. Review the interface description for your core plug-in.

  2. Create a JavaScript file for the implementation. Use this file to define the logic for the methods listed in the interface description.

  3. In the UI, click Customization > Plug-ins > Plug-in Implementations > New.

  4. In the Script File field, open the script file or add a new file.

  5. Click Create Plug-in Implementation.

  6. On the Select Plug-in Type page, click the link for the plug-in type that you want to implement.

  7. On the New Plug-in Implementation page, enter the following information.

    Option

    Description

    Name

    User-friendly name for the implementation. The plug-in implementation appears in the following locations:

    • Manage Plug-ins page. Page used by administrators to enable/disable the plug-in implementation in their account.

    • Bundle Builder. Select this name in the Bundle Builder to distribute the plug-in implementation to other accounts.

    ID

    Internal ID for the implementation for use in scripting. If you do not provide an ID, NetSuite provides one for you when you click Save.

    Status

    Current status for the implementation. Choose Testing to have the implementation accessible to the owner of the implementation. Choose Released to have the implementation accessible to all accounts in a production environment.

    Log Level

    Logging level you want for the script. Select Debug, Audit, Error, or Emergency. These messages appear on the Execution Log subtab for the plug-in implementation.

    Go to Customization > Plug-ins > Plug-in Implementations, select your implementation, and then click the Execution Log subtab.

    Execute As Role

    Role that the script runs as. The Execute As Role field provides role-based granularity in terms of the permissions and restrictions of the executing script. The Current Role value indicates that the script executes with the permissions of the currently logged-in NetSuite user.

    Note:

    You can create the custom role during testing to test the plug-in implementation with the proper role. The role requires the SuiteScript permission. You can then bundle the custom role to distribute it with the plug-in implementation. See Test the Plug-in Implementation and Bundle the Plug-in Implementation.

    Description

    Optional description of the implementation. The description appears for the implementation on the Plug-In Implementations page.

    Owner

    User account that owns the implementation. Default is the name of the logged in user.

    Inactive

    Indicates the plug-in implementation does not run in the account. Inactivate a plug-in implementation, for example, to temporarily disable it for testing purposes.

    Important:

    You cannot execute an implementation as Administrator. You must choose from one of the custom roles listed in the Execute As Role field. Note that System Administrator is a custom role.

  8. On the Scripts subtab, in the Implementation list, change the JavaScript file that contains the implementation of the plug-in, if required.

  9. On the Scripts subtab, in the Library Script File list, select any utility script files or supporting library files that are required by the plug-in script file..

  10. On the Unhandled Errors subtab, specify who to notify if script errors occur.

    • To notify the user that is logged in and running the script, check the Notify Current User box.

    • To notify the script owner, check the Notify Script Owner box. The Notify Script Owner box is checked by default.

    • To notify all administrators, check the Notify All Admins box.

    • To notify a group about the error, select the group to notify. Only existing groups that were set up in Lists > Relationships > Groups are available.

    • Enter individual email addresses in the Notify Emails field. Separate multiple email addresses with a semi-colon.

  11. Click Save.

  12. Click Configure (not available for all plug-in types) and enter configuration settings as applicable. For example, see Configuring the Custom GL Lines Plug-in Implementation. Click Save.

  13. Go to Customization > Plug-ins > Manage Plug-ins.

  14. To enable the plug-in implementation, check the box and click Save.

  15. Test the plug-in implementation.

You can access the list of implementations by going to Customization > Plug-ins > Plug-in Implementations.

Related Topics

Core Plug-in Creation
Available Core Plug-ins
Debugging a Core Plug-in Implementation

General Notices