Best Practices for Workflow Configuration

To ensure that your workflow customization is configured efficiently, consider the following best practices:

Execution Conditions and Context

When configuring your workflow, be specific about the execution conditions and context. For example, only select contexts to trigger the workflow when it is needed. This will ensure data integrity and improve NetSuite’s performance.

To learn more, see Workflow Conditions.

Logging

When configuring workflows, logging is enabled by default when the release status is changed to Testing. When you change it to Released, make sure logging is turned off to keep the file size manageable.

Note:

Client-side triggers do not appear in the workflow log.

To learn more, see Workflow Execution Log.

Naming

When you set up workflows, use clear and unique names for the IDs and names for all your workflows, states, actions, and custom field fields so you don't run into conflicts, especially when installing bundles.

Execute as Administrator

In the order quote approval workflow example, the workflow runs as administrator to access records that need additional privileges. Only use administrator privileges when necessary because overuse can create security risks and affect data integrity.

Scheduled Workflows

If you don’t need your workflow to run at specific times, think about using a scheduled workflow. For example, scheduling record and field updates during slow periods can improve user experience.

Schedule the workflow at the right time and frequency for your business. Running it too often can degrade performance.

Tips for Approval Workflows

When building an approval workflow, consider the following issues:

  • Plan out how many states your workflow needs. If you try to combine too many steps into one state, you might get unexpected results, but adding too many states can make things more complex.

  • Using fields such as Next Approver and Approval can save time when creating approval workflows. These fields only work with certain records, so check that they fit your needs before using them.

  • When transactions are approved, lock them with Do Not Exit states or add workflow conditions so they don't keep re-entering the workflow.

To learn more about approval workflows, see Approval Workflow Example.

Execution Order of Scripts and Workflows

When you deploy scripts and workflows together, especially if they use the same triggers and contexts, remember that scripts run before workflows. For example, if both set the value of a field, the workflow's value is the one that sticks.

x

To learn more, see Performance Tips for Scripts and Workflows.

Related Topics

General Notices