Creating a Custom Plug-in Type in an XML Definition
In SuiteCloud Development Framework (SDF), custom plug-in types are represented by plugintype
objects.
To create a plugintype
object, perform one of the following procedures:
Procedure |
Details |
---|---|
In SuiteCloud IDE, create a custom plug-in implementation in a NetSuite account . |
See Creating the Default Implementation for a Custom Plug-in. |
In the NetSuite interface, create a custom plug-in type in a NetSuite account. |
See Creating the Default Implementation for a Custom Plug-in. Import the |
In the SuiteCloud Extension or in the SuiteCloud IDE, create a custom plug-in implementation using a template. |
See Creating a SuiteScript File in SuiteCloud Extension for Visual Studio Code. See Creating an XML Definition for an SDF Custom Object in SuiteCloud IDE Plug-in for WebStorm. |
Custom Plug-in Type Required Fields
The following table contains fields that are required for custom plugintype
objects. For a list of all available fields, see the reference documentation for the plugintype
element in SuiteCloud Development Framework XML Reference.
The scriptid
attribute is required for the plugintype
element. The scriptid
attribute value must match the filename
excluding the file extension.
For SuiteScript 1.0 custom plug-in types:
-
The
class
field is required. Theclass
field value represents the custom plugin. Format the class name in Pascal case (PascalCase). Use the class name to instantiate the implementation you want to use in your custom plug-in script. For more information, see Instantiating a Custom Plug-in Script in SuiteScript 1.0. -
If you are using a library, use the
libraries
element to add library files that support your implementation.
Field |
Type |
Description |
---|---|---|
|
|
The number of custom plug-in type implementations that an administrator can activate at one time. Possible values are:
|
|
|
A user-friendly name for the custom plug-in type. This name is seen by solution implementors when they create alternate implementations of the plug-in type. The name is also seen by administrators when they activate or deactivate implementations of this type. |
|
|
The script file ( |
|
|
The status of the custom plug-in type. Possible values are RELEASED and TESTING. Ensure the value is set to RELEASED prior to bundling the custom plug-in. See Bundling a Custom Plug-in. |
Custom Plug-in Type Methods
Specify the functions from the script file using the methods
element.
Functions are specified using the following fields:
Field |
Type |
Description |
---|---|---|
|
string |
The name of a function defined in the interface. Do not include parentheses or parameters. |
|
string |
A description for the method. |
For an example of a plugintype
object that contains methods, see Custom Plug-in Type Object Example.