08

Building Approval Workflows

End States, Button Transitions, and Multi-Level Approvals

🎯 Learning Objectives

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

Approval Workflow Components

A basic approval workflow requires these minimum components:

State 1: Waiting for Approval
State 2: Approved


State 1: Waiting for Approval
State 3: Rejected

Step-Based Approach to Building Approvals

Step 1: Create States and Buttons

  1. Create each state (Waiting, Approved, Rejected)
  2. Configure Add Button actions in Waiting state
  3. Configure transitions to end states
  4. Test with Workflow History to verify flow

Step 2: Restrict Actions with Conditions

Add conditions so only the approver sees the buttons. May require a workflow field to store the current approver identity.

Step 3: Adjust Display Characteristics

Lock records or hide fields at end states to prevent unauthorized modifications.

Step 4: Define Approval Statuses

Create a custom list for approval statuses and set values at each state transition.

Step 5: Add Notifications

Configure Send Email actions to notify approvers of pending items and submitters of approval status.

Key Approval Actions

Add Button

Adds custom buttons (Approve, Reject) to the record form. Buttons trigger transitions to other states.

Triggers: Before Record Load, Entry

Remove Button

Removes standard NetSuite buttons. Cannot remove custom buttons—delete/inactivate the Add Button action instead.

Triggers: Before Record Load, Entry

Lock Record

Makes record read-only by removing Edit button. Add to each state where locking is needed.

Triggers: Before Record Load, Entry

Send Email

Sends notifications to approvers (pending items) and submitters (status updates).

Triggers: After Record Submit only

Understanding End States

End states have no outgoing transitions. There are two types:

Exiting End States (Default)

Non-Exiting End States

✅ When to Use Non-Exiting

Approved state: Use non-exiting + Lock Record to prevent modifications.

Rejected state: Leave as exiting so records can return to Waiting for Approval.

💡 Execution Log Benefit

Non-exiting end states result in cleaner execution logs—only one entry for initial workflow execution instead of entries every time the record is viewed.

Configuring Button Transitions

When using buttons to trigger transitions, configure the Transition On field appropriately:

  1. Create Add Button action with button label (e.g., "Approve Review")
  2. Draw transition from current state to target state
  3. Edit transition and set Transition On = Entry
  4. In the Initiate Condition, select the button that triggers this transition

⚠️ Transition On for Buttons

When configuring button-triggered transitions, Transition On should typically be set to Entry or left blank, not Before/After Record Submit.

Multi-Level Approval with Looping

For hierarchical approvals (e.g., manager → director → VP), use looping logic:

Pattern: Check for More Approvers

State 1: Waiting for Approval
State 1A: More Approvers?
State 2: Approved


↑ Loop back if more approvers ↩
  1. Create a workflow field to track "Current Approver"
  2. When approved, transition to "More Approvers?" state
  3. In that state, check if supervisor exists (join to Employee record)
  4. If supervisor exists: Set Current Approver = Supervisor, transition back to Waiting
  5. If no supervisor: Transition to final Approved state

📋 Supervisor Hierarchy

Use a record join to access the Employee record's Supervisor field. When Current Approver's Supervisor is empty, all approvals are complete!

🎯 Hands-On Exercises

Build complete approval workflows:

Go to Module 8 Exercises →

🌟 Key Takeaways