Multi-State Workflows, Transitions, and Active Triggers
Upon completion of this module, you will be able to:
While single-state workflows work great for client-side actions (Module 3 📚), server-side workflows often benefit from multiple states. Key considerations:
Remember the modular approach from Module 1 📚—multiple small workflows are easier to maintain than one monolithic workflow!
Creates a new standard or custom record. Ensure all required fields are populated or the action fails!
Triggers: All server triggers (use After Record Submit when creating joined records on new parent records)
Sends email notifications. Requires sender, recipient, and content (custom text or template).
Triggers: After Record Submit ONLY
Converts one transaction type to another (e.g., Estimate → Invoice). Base record type stays the same.
Triggers: After Record Submit, Entry, Exit, Scheduled
Redirects users to a different page in NetSuite.
Triggers: After Record Submit, Entry
Redirects users to a specific record. If no ID specified, creates a new record of that type.
Triggers: After Record Submit, Entry
| Action | Before Record Submit | After Record Submit |
|---|---|---|
| Create Record | ✓ | ✓ (required for new joined records) |
| Set Field Value | ✓ (preferred) | ✓ (causes re-save!) |
| Return User Error | ✓ | — |
| Send Email | — | ✓ |
| Go to Page/Record | — | ✓ |
| Transform Record | — | ✓ |
When creating a related record that joins to a new parent record, use After Record Submit. The parent must exist in the database first! For existing parent records, Before Record Submit works fine.
Transitions move records between states. The Transition On trigger defines when a transition executes.
Understanding the active trigger is critical for multi-state workflows:
If a state has a Send Email action but the record entered on Before Record Submit, the email won't send—Send Email isn't valid at Before Record Submit! Use the Transition On field to force After Record Submit as the incoming trigger.
If workflow initiation is Before Record Submit but you need After Record Submit actions:
Keep workflow initiation at Before Record Submit for validations, then use Transition On to shift to After Record Submit for states that need it. Changing initiation to After Record Submit would skip validation actions!
When Set Field Value runs at After Record Submit, the server reloads the record, updates the value, and re-saves. This is slower than Before Record Submit where changes commit with the original save. Always prefer Before Record Submit for Set Field Value when possible!
Build a multi-state workflow with record submit actions: