Add the Plug-in Implementation
When you finish creating the plug-in implementation script file, create a new plug-in implementation in your development account. When you create the plug-in implementation, you upload the script file and other utility files as needed. You can bundle this implementation to distribute it to other NetSuite accounts.
To create a new plug-in implementation:
-
Review the interface description for your core plug–in.
-
Create a JavaScript file for the implementation. Use this file to define the logic for the methods listed in the interface description.
-
In the UI, click Customization > Plug-ins > Plug-in Implementations > New.
-
In the Script File field, open the script file or add a new one.
-
Click Create Plug-in Implementation.
-
On the Select Plug-in Type page, click the Email Capture link.
-
On the 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 or 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 of the implementation for scripting. If you leave this field blank, NetSuite provides an ID when you click Save.
Status
Current status for the implementation. Choose Testing to make the implementation available only to the owner, or Released to make it available to all accounts in production.
Note:The status must be set to Released for the plug-in to work with email messages coming from outside of NetSuite.
When the status is set to Testing, only the script owner can use the plug-in implementation. Since email messages arrive from outside of NetSuite, it can't tell who sent them, so the plug-in implementation won't work if the status is set to Testing.
Log Level
Logging level for the script. Select Debug, Audit, Error, or Emergency. These messages appear on the Execution Log subtab for the plug-in implementation.
Execute As Role
Role that the script runs as. The Execute As Role field lets you control permissions and restrictions of the executing script. Select Current Role to run the script using the permissions of the user who is currently logged in.
Note:You can create the custom role for testing, provided it has the SuiteScript permission. You can bundle this custom role with the plug-in implementation. See Test the Plug-in Implementation and Bundle the Plug-in Implementation.
Description
Optional description of the implementation, displayed 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 that the plug-in implementation isn't running in the account. Inactivate a plug-in implementation to temporarily disable it for testing.
Important:You can't run an implementation as Administrator. You must select a custom role in the Execute As Role field. Note that System Administrator is a custom role.
-
-
On the Scripts subtab, in the Implementation list, change the JavaScript file that contains the implementation of the plug-in, if required.
-
On the Scripts subtab, in the Library Script File list, select any utility or library files that plug-in script file needs.
-
On the Unhandled Errors subtab, specify who to notify if script errors occur.
-
To notify the user who 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 box is checked by default.
-
To notify all administrators, check the Notify All Admins box.
-
To notify a group, select the group to notify. Only groups set up in Lists > Relationships > Groups are available.
-
Enter individual email addresses in the Notify Emails field. Separate multiple email addresses with a semicolon.
-
-
Click Save.
You can see the list of implementations by going to Customization > Plug-ins > Plug-in Implementations.
You can use SuiteCloud Development Framework (SDF) to manage Email Capture 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 one Email Capture Plug-in implementation to another account. When you edit an Email Capture Plug-in implementation, you'll see a Copy to Account option in the upper right corner. For information about Copy to Account, see Copy to Account.