Workbook Builder Plug-ins as XML Definitions
Workbook Builder Plug-in objects in SuiteCloud Development Framework (SDF) only support SuiteScript 2.0 and SuiteScript 2.1.
You can create and manage a Workbook Builder Plug-in implementation in a SuiteCloud project and deploy it to a target NetSuite account. The Workbook Builder Plug-in enables you to create custom workbooks that fit your business needs. You can override the createWorkbook()
function and create a workbook that contains a specific subset of data or a workbook that uses custom logic. For example, you can create a workbook based on user-specific or role-specific information. The default behavior in the N/workbook module does not permit you to do this, which makes the Workbook Builder Plug-in a good choice for these use cases. Workbooks you create using the N/workbook module are static and cannot use dynamic information such as the current role, current user, and so on.
For information about using Workbook Builder Plug-ins, see Workbook Builder Plug-in Interface Overview.
You can also import a Workbook Builder Plug-in implementation from a NetSuite account into a SuiteCloud project. For more information about importing objects, see Account Component Imports to SuiteCloud Projects.
Customizing a plug-in implementation object from your SuiteCloud project is the equivalent of editing or making a new plug-in implementation from the NetSuite UI. For example, select Customization > Plug-ins > Plug-in Implementation > New from a NetSuite account.
To create a Workbook Builder Plug-in implementation in a SuiteCloud project, you must create a plug-in implementation script file. For details, see Creating a Workbook Builder Plug-in Script File.
Workbook Builder Plug-in implementations in SDF are represented with the workbookbuilderplugin
object. To define this object, see the following sections:
Create a Workbook Builder Plug-in Implementation Script File
You need to have a Workbook Builder Plug-in implementation script either in the target account, or in the same SuiteCloud project as your XML object. For more information, see Creating a Workbook Builder Plug-in Script File and SuiteScript Files in SuiteCloud Projects.
Workbook Builder Plug-in Implementation Required Fields
The following table contains fields that are required for workbookbuilderplugin
objects. For a list of all available fields, see workbookbuilderplugin.
Element |
Type |
Description |
---|---|---|
|
string |
A user-friendly name for the Workbook Builder Plug-in implementation. The name is seen by administrators when they activate or deactivate the Workbook Builder Plug-in implementation. This field value can be up to 40 characters long. |
|
filereference |
The script file ( This field must reference a .js file. |
Workbook Builder Plug-in Implementation Object Example
The following is an XML definition example of a Workbook Builder Plug-in implementation object in a SuiteCloud project.
The Workbook Builder Plug-in implementation object, customscript_workbook
, creates a new plug-in that is in TESTING
status. Debugging messages are logged when the script is run. The owner of the object is notified whenever an error is thrown. The workbookbuilder.js
script is called when NetSuite receives a request to create a custom workbook.
Each workbookbuilderplugin
SDF custom object requires a scriptfile
field reference to a SuiteScript file that implements interface functions. For more information, see Creating a Workbook Builder Plug-in Script File. This script file can be in the target account or in the same SuiteCloud project as your plug-in implementation object.
<workbookbuilderplugin scriptid="customscript_workbook">
<description></description>
<isinactive>F</isinactive>
<loglevel>DEBUG</loglevel>
<name>My Workbook Builder</name>
<notifyadmins>F</notifyadmins>
<notifyemails/>
<notifyowner>T</notifyowner>
<notifyuser>F</notifyuser>
<runasrole/>
<scriptfile>[/SuiteApps/workbookbuilder.js]</scriptfile>
<status>TESTING</status>
</workbookbuilderplugin>
For more information about the fields in the preceding example, see workbookbuilderplugin.
Related Topics
- Plug-ins
- Custom Plug-ins as XML Definitions
- Custom GL Lines Plug-ins as XML Definitions
- Email Capture Plug-ins as XML Definitions
- Financial Institution Connectivity Plug-ins as XML Definitions
- Financial Institution Parser Plug-ins as XML Definitions
- Bank Statement Parser Plug-ins as XML Definitions
- Dataset Builder Plug-ins as XML Definitions