SuiteScript 2.1 Event Subscriber Script Reference
Use this reference to learn when to use an Event Subscriber script and which files you need to deploy it:
Event Subscriber Script Use Cases
Unlike user event scripts, which run during record processing, Event Subscriber scripts run after the originating operation is complete. Common use cases include:
-
Sending notifications after subscribed events
-
Updating related data after record changes
-
Starting external or long-running processing without delaying the record operation
Event Subscriber Script Requirements
Before you deploy an Event Subscriber script, create the following files in your SuiteCloud project:
|
File |
Requirement |
|---|---|
|
Event Subscriber script file |
Uses SuiteScript 2.1, declares |
|
Event Subscriber SDF object definition |
References the script file and includes one or more criteria that identify subscribed events. |
To set up an Event Subscriber script, first create the script file. Then create an Event Subscriber definition that references the file and includes one or more subscription criteria. Add both files to a SuiteCloud project and deploy the project to the target account.
For example, see SuiteScript 2.1 Event Subscriber Script Code Samples.