Triggers are based on events that occur during the processing of a record in NetSuite and dictate when the
workflow should perform certain tasks. SuiteFlow includes two types of triggers.
1. Server Triggers
Server triggers occur when a record is read from or written to the NetSuite database or when
a record enters or exits a state in a workflow. Server triggers are classified as either record
based, workflow based, or time based.
- Record based triggers occur when something happens to the record: The record is going to load (Before Record Load trigger)
After the record loads, but before it is saved (Before Record Submit trigger)
The record is saved (After Record Submit trigger)
- Workflow based triggers occur when something happens to the workflow.
A state has been entered (On Entry trigger)
A state has been exited (On Exit trigger)
- Time based triggers occur according to a user-defined schedule (Scheduled trigger)
2. Client Triggers
Client triggers execute when a user interacts with a record form in NetSuite. You can view the
client triggers used for actions for a specific workflow state under Form Event on the State
subtab of the context panel
- Before User Edit Executes when the record form loads into the browser. Use this trigger, for example, to make changes to the record form in the browser before the user edits any field.
- Before Field Edit Executes when user tabs or clicks away from a field after entering a value. Use this trigger, for example, when validating the value of a record field
- After Field Edit Executes when a user enters or changes the value of a field. Use this trigger, for example, when dynamically updating the values of other fields when a user changes the value of a specific field.
- After Field Sourcing Executes after a field change, after all the field values for the field are sourced. Use this trigger, for example, when setting field values based on other sourced values
- Before User Submit Executes every time a user clicks Save when the form is in the state. The actions execute in the browser, before any data is sent to the NetSuite database and the save operation occurs. Use this trigger, for example, when validating record form field values.