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 configuring workflows, create clear and unique names for the IDs and names for all your workflows, states, actions, and custom field fields to ensure no conflicts occur, especially when installing bundles.

Execute as Administrator

In the order quote approval workflow example, the workflow is set to execute as administrator to access records that require additional privileges. Only use administrator privileges when necessary because overuse creates security risks and may compromise data integrity.

Scheduled Workflows

If you don’t need your workflow to trigger at specific points in time, consider using a scheduled workflow. Scheduling record and field transformations, for example, at a quiet time for your business can improve the user experience.

Be sure to schedule the workflow at the appropriate time for your business, and also that it runs at the necessary frequency. Running the workflow too often can degrade performance.

Tips for Approval Workflows

When building an approval workflow, consider the following issues:

  • Carefully plan how many states are required for your workflow. Trying to condense states can lead to unexpected behavior, while adding too many can make the workflow unnecessarily complex.

  • Using native fields such as Next Approver and Approval, for example, helps save time when creating approval workflows. These fields are specific to certain records, so make sure they suit your needs before using them.

  • When transactions are approved, lock them using Do Not Exit states, or by adding workflow conditions so the transactions do not continue to enter the workflow after they are approved.

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

Execution Order of Scripts and Workflows

When deploying scripts and workflows together, especially if they have the same triggers and contexts, remember that scripts are triggered before workflows. For example, if they both set the value of a particular field, then the final value of the field is the one set by the workflow.

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

Related Topics

Customize with Workflows
Example Workflow: Order Quote Approval

General Notices