Best Practices for Efficient Workflow Processing
Upon completion of this module, you will be able to:
While individual performance gains may seem small (milliseconds), they compound significantly when:
Chrome Developer Tools and NetSuite Application Performance Management SuiteApp provide general timing information, but not specific bottleneck identification within workflows.
Don't try to do too much in one workflow. Break complex processes into smaller, focused workflows. This improves maintainability AND performance.
Create separate workflows for client-triggered actions vs. server-triggered actions. This makes troubleshooting easier and can improve execution efficiency.
Parent workflows can initiate child sub-workflows for additional processing. This provides better control over execution order while maintaining modularity.
Define conditions that prevent unnecessary workflow initiation. It's better to NOT initiate a workflow than to initiate it and immediately exit because conditions aren't met.
Example: For CSV imports, set Context = "CSV Import" to prevent workflow execution on non-imported records. Only initiate workflows during bulk imports when absolutely necessary.
Selecting "All" can cause unexpected workflow initiation. Always select the most appropriate specific trigger (Before Record Load, Before Record Submit, or After Record Submit).
Using "Old Record" in the Value Field causes the server to reload the record from the database during condition evaluation. This adds overhead on every evaluation.
Saved search evaluation impacts performance—especially when configured on individual action/transition conditions. If needed, configure on workflow initiation so it's evaluated once, not multiple times.
Conditions with related record joins become complex SQL queries. Alternatives:
When multiple workflows run at After Record Submit, records are reloaded on the server. Additionally:
Every Set Field Value action at After Record Submit causes the record to be reloaded and re-saved. For data-heavy transactions, this significantly impacts performance!
Configure Set Field Value actions at Before Record Submit whenever possible. Changes commit with the original save—no re-save required.
Even at Before Record Submit, add conditions to prevent unnecessary Set Field Value execution:
Add a condition that checks if the field value has actually changed before executing Set Field Value. If the value hasn't changed, skip the action—no re-save triggered.
When updating Release Status to "Released", uncheck Enable Logging. Logging generates database entries for every action execution—unnecessary overhead in production.
Even with logging disabled, server-side errors are still logged. Only event-based (UI) errors are suppressed.
| Area | Do This | Avoid This |
|---|---|---|
| Design | Modular, focused workflows | One giant workflow |
| Initiation | Specific triggers with conditions | "All" trigger without conditions |
| Conditions | Standard conditions, sourced fields | Old Record, saved searches, complex joins |
| Set Field Value | Before Record Submit | After Record Submit |
| Logging | Enabled for Testing only | Enabled in Production |