Before Record Submit Trigger
The Before Record Submit trigger is a server trigger and executes after a user clicks Save on a record, but before NetSuite saves the data to the database. Actions and transition set to execute on Before Record Submit execute on the NetSuite server, before the record data is ‘submitted’ to the database.
The Before Record Submit trigger can be used for the following elements of a workflow:
-
Workflow initiation. See Workflow Initiation Triggers and SuiteFlow Trigger Execution Model. For an example, see Before Record Submit Trigger Example.
-
Actions. For a list of actions that support the Before Record Submit trigger, see Workflow Triggers Quick Reference.
-
Transitions. See Transition Triggers.
The following diagram shows typical record events and when the Before Record Submit trigger executes:
In general, use the Before Record Submit trigger when you want to use a workflow to make changes to the record before NetSuite saves the data to the database. For example, use the Before Record Submit trigger in the following situations:
-
Validate record data before NetSuite submits it to the database.
-
Perform permission checks or validate restrictions before NetSuite writes the data to the database. Use a Return Error Action on a Before Record Submit trigger to prevent a user from saving the record until the user correctly modifies the record.
-
Set certain field values for a record, based on other field values entered by the user.
Before Record Submit Trigger Example
The following screenshots show the workflow definition and entry state for a workflow that initiates after a user clicks Save on a new Travel Request record:
Workflow Definition

Entry State

User Behavior |
Workflow Behavior |
---|---|
User creates a new Travel Request record. |
None. |
User clicks Save on the Travel Request record. |
Workflow instance initiates, enters the entry state, executes the three Set Field Value actions. In this state, a transition executes on an After Record Submit trigger. Consequently, the record transitions to the next state after the record data is saved to the database. |
The state is designed so the actions execute on the Entry trigger. They do not use the Before Record Load trigger, for example, because the workflow instance did not initiate until the Before Record Submit trigger executed. If the actions were set to execute on the Before Record Load trigger, they would not execute, because the record entered the state on a Before Record Submit trigger. For more information, see Rules and Guidelines for Workflow Triggers and Trigger Execution.
Before Record Submit Trigger Guidelines
Use the following guidelines when using the Before Record Submit trigger.
-
The Before Record Submit and Before User Submit triggers appear to be functionally similar. However, actions that use the Before Record Submit trigger execute on the server, whereas actions that use the Before User Submit trigger execute in the browser.
For example, a Return User Error on a Before Record Submit trigger would execute on the server. The user would return to the record and all previously entered data would be lost. If a Return User Error or Show Message action executes on a Before User Submit trigger instead, the user clicks OK on the message and continues editing the record with no loss of data.
-
In addition to the Before User Submit trigger, the Before Record Submit trigger also appears similar to the After Record Submit trigger, since they both execute after the user clicks Save on a record. However, for the Set Field Value, Custom, Create Record, Initiate Workflow, and Subscribe To Record actions, other differences may impact the workflow. See Comparing the Before Record Submit and After Record Submit Triggers.