Using Conditional Fields with Actions

As a user interacts with a record form, the user makes changes to the fields on the record. NetSuite can detect when a user makes a change to a specific record field. You can direct the workflow to dynamically perform other actions based on when the field changes and the associated field value.

Use client triggers on a record form to detect the events that occur when a user interacts with the form. Use the Client Fields multi-select box to detect which field or fields changed during the record form events. For example, you can direct an action to populate the Sales Rep Phone after a user edits the Sales Rep Name field.

You can use the following action types on the following client triggers:

Action Name

Available Triggers

Return User Error Action

Before User Edit, Before Field Edit, After Field Edit, After Field Sourcing, Before User Submit

Set Field Display Label Action

Before User Edit, Before Field Edit, After Field Edit, After Field Sourcing

Set Field Display Type Action

Before User Edit, Before Field Edit, After Field Edit, After Field Sourcing

Set Field Required Action

Before User Edit, Before Field Edit, After Field Edit, After Field Sourcing

Set Field Value Action

Before User Edit, Before Field Edit, After Field Edit, After Field Sourcing, Before User Submit

Show Message Action

Before User Edit, Before Field Edit, After Field Edit, After Field Sourcing, Before User Submit

Dynamic Set Field Value Example

The following example shows a Set Field Value action that executes on the After Field Edit trigger. After a user edits either the Description or Emergency Reason fields, the action executes. The action concatenates the value of the two fields and populates the Full Description field.

You can use a similar solution with client-side actions, like the Set Field Required and Set Field Display Type actions.

An example of a workflow that shows a Set Field Value action that is set to execute on the After Field Edit trigger.
Note:

You can reference the internal NetSuite ID of field in formulas. For more information about getting the internal NetSuite ID of fields, see Using Internal IDs.

Dynamic Return User Error Example

The following example shows a Return User Error action that executes on the After Field Edit trigger and uses a condition. After a user edits the Customer Rank field, the action executes. The action returns an error if the Customer Rank field is greater than 10. NetSuite returns the focus to the Customer Rank field and the user cannot proceed further without fixing the rank.

You can use a similar solution with other client-side actions, like the Show Message action, except that Show Message does not prevent the user from continuing. See Return User Error Action, Show Message Action, or After Field Edit Trigger.

An example of a workflow that shows a Return User Error action that executes on the After Field Edit trigger and uses a condition.

Related Topics

Action Examples
Workflow Actions
Working with Actions
Workflow Actions Overview

General Notices