Before User Edit Trigger
The Before User Edit trigger is a client trigger and executes after a record form loads into the browser and before the user makes any changes to the form. Before User Edit is a client trigger because it occurs after the form loads into the browser. The trigger occurs due to user edit of an existing record or creation of a new record. Before User Edit only occurs one time when the record form is present in the browser.
The following diagram shows common record edit events and when the Before User Edit trigger executes:
Use this trigger to make changes to the record form in the browser before the user edits any field. You can use this trigger with any of the field value actions, such as the Set Field Value action, or with the Return User Error action. For a list of all the actions that support this trigger, see Workflow Triggers Quick Reference.
Before User Edit Trigger Example
The following screenshot shows a state with actions set to execute on the Before User Edit trigger:

Action Type |
Action Execution |
---|---|
Set Field Display Type |
The two Set Field Display Type actions disable the Email field and the Repairs Complete checkbox, respectively. The fields are visible but are not editable. |
Set Field Required |
On a Bike Repair record, the Description field is not required by default. The Set Field Required makes the Description field required. |
This state is designed to customize the record form, depending on the user role accessing the record in the workflow. The following screenshot shows the respective action results on the record form:

Before User Edit Trigger Guidelines
Use the following guidelines when using the Before User Edit trigger.
-
For SuiteScript users, the Before User Edit trigger is the workflow equivalent of the pageInit client event. For JavaScript, execution of the Before User Edit trigger is similar to the onLoad client event.
-
If a user reloads a record during the time that the record is in a state that includes actions that execute on the Before User Edit trigger, the actions execute again.
-
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 general, you should use the Before Record Load trigger over the Before User Edit trigger. The server-side processing of actions is typically safer than client-side processing because there is a greater assurance of consistency in behavior. There can be inconsistent behavior if something unexpected occurs in the client environment, such as a browser upgrade.
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 Display Type (Disabled, Hidden, Normal)
Yes
Yes
Set Field Display Type (Inline)
Yes
No
Set Field Required
Yes
Yes
Set Field Display Label
Yes
No
Add Button, Remove Button
Yes
No
Lock Record
Yes
No