Creating a New Plug-in Implementation
The following process is a generic procedure for creating 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 under Available Core Plug-ins.
To create a plug-in implementation, create the script file, then upload it along with any utility files needed.
To create a new plug-in implementation:
-
Review the interface description for your core plug-in.
-
Create a JavaScript file for your implementation and use it to define the logic for the methods in the interface description.
-
In the UI, go to Customization > Plug-ins > Plug-in Implementations > New.
-
In the Script File field, open your script file or add a new one.
-
Click Create Plug-in Implementation.
-
On the Select Plug-in Type page, click the link for the plug-in type you want to implement.
-
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 – used by administrators to enable and disable the plug-in implementation in their account.
-
Bundle Builder – where you distribute the plug-in implementation to other accounts.
ID
Internal ID for the implementation to use in scripting. If you don't enter an ID, NetSuite creates one for you when you click Save.
Status
Current status for the implementation. Choose Testing to make it available to the owner, or Released to make it accessible to all accounts in production.
Log Level
Select the logging level you want for the script: 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
Select the role the script runs as. The Execute As Role field lets you set permissions and restrictions at the role level for the executing script. If you select Current Role, the script runs with the permissions of the currently logged-in NetSuite user.
Note:You can create a custom role during testing to test the plug-in implementation with the correct permissions. The role needs the SuiteScript permission. You can 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 on the Plug-In Implementations page.
Owner
User account that owns the implementation. By default, it's the name of the logged-in user.
Inactive
Indicates the plug-in implementation doesn't run in the account. You can inactivate a plug-in implementation to temporarily disable it for testing.
Important:You cannot run an implementation as Administrator. You must choose from one of the custom roles listed in the Execute As Role field. System Administrator is considered a custom role.
-
-
On the Scripts subtab, in the Implementation list, change the JavaScript file for the plug-in implementation, if required.
-
On the Scripts subtab, in the Library Script File list, select any utility script files or supporting library files that your plug-in script file needs.
-
On the Unhandled Errors subtab, specify who to notify if script errors occur.
-
To notify the user who's 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 groups set up in Lists > Relationships > Groups are available.
-
Enter individual email addresses in the Notify Emails field, separated by a semi-colon.
-
-
Click Save.
-
Click Configure (if available) and enter any needed configuration settings. For example, see Configuring the Custom GL Lines Plug-in Implementation. Click Save.
-
Go to Customization > Plug-ins > Manage Plug-ins.
-
To enable the plug-in implementation, check the box and click Save.
-
Test the plug-in implementation.
You can see the list of implementations by going to Customization > Plug-ins > Plug-in Implementations.