05

Configuring Actions on Record Load

Display Persistence, Event Types, and Record Joins

🎯 Learning Objectives

Upon completion of this module, you will be able to:

Actions on Before Record Load

Many actions you configured on client triggers in Module 3 (📚) can also be configured on the Before Record Load server trigger. Here's the comparison:

Action Before User Edit (Client) Before Record Load (Server)
Set Field Display Type
Set Field Mandatory
Set Field Display Label
Set Field Value✓ (New records only!)
Add Button
Remove Button
Lock Record

⚠️ Set Field Value Limitation

On Before Record Load, Set Field Value only works when creating new records. You cannot set field values on existing records at this trigger!

Additional Before Record Load Actions

Add Button

Adds a custom button to the record form. Used for transitions or navigation.

Remove Button

Removes a standard NetSuite button from the form. Note: Cannot remove buttons added with Add Button—delete/inactivate the action instead.

Lock Record

Makes the record read-only by removing the Edit button. Must be added to each state where locking is needed.

Understanding Display Persistence

This is one of the most important concepts in SuiteFlow. Form-level actions like Set Field Display Type, Set Field Display Label, Set Field Mandatory, Add/Remove Button, and Lock Record are NOT persisted to the database.

⚠️ The Display Persistence Problem

Actions configured only on Before User Edit (client trigger) will work during create and edit—but may NOT persist when viewing a record!

Example: Set Field Display Label

Scenario: You configure Set Field Display Label to change "Review Name" to "Review Period" on Before User Edit.

✅ Solution: Use Both Triggers

Configure the action on Before Record Load (server) in ADDITION to Before User Edit. Before Record Load fires in the View context!

💡 Best Practice

Always prefer Before Record Load over Before User Edit for display actions. Server execution is more consistent across browsers, and it handles the View context automatically.

Event Types

Event types allow you to filter action execution based on specific user events in the NetSuite UI. Think of them as another type of workflow condition.

Common Event Types for Before Record Load

Event Type Description
CopyUser copies an existing record to create new
CreateUser clicks New to create a record
EditUser opens record in Edit mode
ViewUser opens record in View mode
PrintUser opens record in Print mode
EmailAutomatic email notification sending

📋 Example: Hide Field When Viewing/Printing

Configure Set Field Display Type with event types = View, Print to hide "Salary Increase Amount" only when viewing or printing—but show it during Edit!

⚠️ Event Type Limitations

  • Only available on server triggers
  • Not available when "All" is selected as trigger type
  • Not available for scheduled actions
  • Ignored if no selections made in multi-select field

Record Joins

A record join allows you to access field data from related records in your workflow conditions. This is powerful for building conditions based on data that lives outside the current record.

Join Relationship Examples

📋 Using Joins in the Visual Builder

In the Visual Builder's condition editor, you can select fields from related records. Look for the "joined" field options that reference related record types.

Example: Condition Based on Employee Type

Create a condition where an action only executes if the associated Employee's type is "Contractor":

  1. In Visual Builder, select the Employee join field
  2. Select "Employee Type" from the related Employee record
  3. Set condition: Employee Type = Contractor

🎯 Hands-On Exercises

Practice server trigger actions and display persistence:

Go to Module 5 Exercises →

🌟 Key Takeaways