Sample SSP Application Code (SuiteScript 2.0)
SuiteScript 2.0 SSP application files must start with this directive:
<%@ NApiVersion="2.x"%>
This directive ensures that the script always uses the latest minor version of SuiteScript 2.0. If this isn't the first directive in the .ssp file, it's treated as a SuiteScript 1.0 file and throws an error.
Note:
You can't use @NScriptType
annotation in .ss or .ssp files.
The simple Email Form example below gives you a basic idea of how .ssp and .ss files are structured for SSP applications written in SuiteScript 2.0. It has three files:
-
Entry point:
Entry Point: emailSender.ssp
-
Service:
Service: emailService.ss
-
Custom module:
Custom Module: emailHandler.js
Related Topics
- Create a SuiteScript 2.0 SSP Application Record
- Upload SSP Application Files to the File Cabinet
- Set Execute as Role Permissions for .ss and .ssp Files
- Select Default SSP File
- Make SSP Application available on System Domain
- Deploy and Undeploy SSP Applications
- Sample SSP Application Code (SuiteScript 2.0)
- Debug a SuiteScript 2.0 SSP Application
- SuiteScript 2.0 SSP Applications
- Create and Use SSP Applications