plugin.loadImplementation(options)
Method Description |
Instantiates an implementation of the custom plugin type. Returns the implementation which is currently selected in the UI (Manage Plug-ins page) when no implementation ID is explicitly provided. |
Returns |
An Object implementing the custom plug-in type. |
Supported Script Types |
Server scripts For more information, see SuiteScript 2.x Script Types. |
Governance |
None |
Module |
|
Since |
2016.1 |
Parameters
The options parameter is a JavaScript object.
Parameter |
Type |
Required / Optional |
Description |
Since |
---|---|---|---|---|
|
string |
required |
The script ID of the custom plug-in type. |
2016.1 |
|
string |
optional |
The script ID of the custom plug-in implementation. |
2016.1 |
Error Code |
Thrown If |
---|---|
UNABLE_TO_FIND_IMPLEMENTATION_1_FOR_PLUGIN_2 |
Either there is no such implementation of the provided plug-in type, or the plug-in type does not exist. |
Syntax
The following code snippet shows the syntax for this member. It is not a functional example. For a complete script example, see N/plugin Module Script Sample.
//Add additional code
...
var pl = plugin.loadImplementation({
type: 'customscript_sample_plugin'
});
...
//Add additional code