Creating a Suitelet File

You must create a JavaScript file and add the Suitelet script. For more information about creating the Suitelet script, see SuiteScript 2.x Suitelet Script Type.

You must follow the following processes in sequential order to write the Suitelet script:

Adding Annotations

          /**
* @NApiVersion 2.x
* @NScriptType Suitelet
* @NModuleScope Public
*/ 

        

Importing Custom Plug-in Module

          define(["N/plugin"], function (plugin) {
…..
}) 

        

Adding Suitelet Entry Point

          function onRequest(context) {
….
} 

        

Using the N/plugin Module to Load EP API Plug-in

You must use the N/plugin Module to load the to load the EP API Plugin SS2 custom plug-in in the Suitelet script.

          var epPlugin = plugin.loadImplementation({
type: "customscript_17239_ep_api_plugin",//this is same ID which noted
implementation: "default"
 }); 

        
Note:

plugin.loadImplementation is used to load the plug-in into script and its two parameters. The following are the parametets:

  • Type – ID of the custom plug-in

  • Implementation – Name of the custom plug-in implementation

This is the default script provided by the Electronic Bank Payments SuiteApp. For more details on N/plugin module, see N/plugin Module.

General Notices