Before Record Load Trigger
The Before Record Load trigger is a server trigger and executes before a record loads into the browser. Actions and transitions set to execute on Before Record Load execute on the NetSuite server, after a user clicks Edit or View, and before the record loads and the user has access to the record.
The Before Record Load trigger can be used on the following elements of a workflow:
-
Workflow initiation. See Workflow Initiation Triggers and SuiteFlow Trigger Execution Model.
-
Actions. For a list of actions that support the Before Record Load trigger, see Workflow Triggers Quick Reference.
-
Transitions. See Transition Triggers.
The following diagram shows typical record events and when the Before Record Load trigger executes:
In general, use the Before Record Load trigger when you want to use a workflow to make changes to the record before the record loads into the browser. For example, use the Before Record Load trigger in the following situations:
-
Add or remove buttons, depending on the user role or other conditions.
-
Perform calculations based on field values and display those values when the records loads.
-
Lock the record to make the record uneditable for specific users or user roles.
-
Change the display type for fields to make certain fields required or hide them.
-
Validate the record or check the record for permissions to prevent a record from being viewed.
Before Record Load Trigger Example
The following screenshot shows actions for a state set to execute on the Before Record Load and Entry triggers:

Trigger Type |
Action Execution |
---|---|
Before Record Load |
Several actions may execute before the record loads into the browser, depending on the user that accesses the record:
|
Entry |
The Send Email action executes when the record enters the state for the first time. |
This state is designed so that whenever the Travel Request record gets accessed, the approval buttons are added for the approver of the Travel Request and Current Approval and Rejection Reason fields become editable.
For the employee that submitted the Travel Request, the record is only locked, the buttons do not appear, and the Current Approval and Rejection Reason fields appear but are not editable.
Guidelines for Using the Before Record Load Trigger
Use the following guidelines when using the Before Record Load trigger.
-
Refreshing the browser reloads a record. If a user refreshes the browser during editing or viewing of a record in a state, all Before Record Load actions in that state execute again.
-
You cannot set field values on an existing record if the Set Field Value actions execute on a Before Record Load trigger. Use the Set Field Value action with a Before Record Load trigger for new records or for setting workflow fields on new or existing records. Use a custom action to update fields on an existing record.
-
The Before Record Load and Before User Edit triggers appear to be functionally similar. However, actions that use the Before Record Load trigger execute on the server, whereas actions that use the Before User Edit trigger execute in the browser.
In addition, actions set to trigger on Before Record Load execute every time the record is loaded. Actions set to trigger on Before User Edit only execute right before the user edits the record. If an action modifies a record on a Before User Edit trigger, the edits are lost unless the user saves the record.
The following table lists the action types that can be performed on each trigger and might need to be performed before the record appears to a user:
Type of Action
Before Record Load
Before User Edit
Set Field Value (new records)
Yes
Yes
Set Field Value (existing records)
No
Yes
Set Field Value (workflow fields)
Yes
No
Set Field Display Type (Disabled, Hidden, Normal)
Yes
Yes
Set Field Display Type (Inline)
Yes
Yes
Set Field Required
Yes
Yes
Set Field Display Label
Yes
Yes
Add Button, Remove Button
Yes
No
Lock Record
Yes
No