ANS-1279 · CUSTOM FIELDS, RECORDS & FORMS

How to Copy a Non-Stored Field Value to a Stored Field in NetSuite Workflow?

Understand the NetSuite workflow contexts and triggers required to successfully transfer data from a non-stored field, often sourced from a saved search, into a stored field.

Short answer

To copy a non-stored field value to a stored field in NetSuite Workflow, use a button to transition to a second state. Configure 'Set Field Value' actions in this state to execute on entry, including workflow and user event script contexts. For non-button actions, 'After Submit' or 'Scheduled' triggers are essential to ensure data availability and prevent errors.

Scenario

NetSuite users often need to populate a stored field with a value derived from a non-stored field, such as one sourced from a saved search. The challenge arises in configuring a workflow to execute this data transfer reliably. Incorrect workflow contexts or triggers can lead to errors, especially when dealing with new or existing records and their availability in the database.

Solution

To copy a non-stored field value to a stored field using a button, configure the workflow as follows:

  1. Create a button to transition the record to a second workflow state.

  2. In this second state, add 'Set Field Value' actions.

  3. Ensure these 'Set Field Value' actions are set to execute on entry.

  4. Include both the workflow and user event script contexts for these actions.When not using a button click, an action to set a stored value field from a non-stored value field sourced from a saved search must be either after submit or scheduled. This is due to several critical considerations:

  5. Set field value actions executed on before record load on existing records will result in an error. If you were trying to record information for a new record, the record does not exist in the database to be used to filter the search until after submit.

  6. A before record submit trigger will set the value of the non-store value field before the record is saved to the database, meaning that any changes to the record on an edit will not be reflected.

  7. Unless the workflow initiation and/or transitions are planned to ensure the record enters a state on after record submit or on a schedule, entry triggers are frequently evaluated on before record load, resulting in the error from point 1.

Expert NetSuite Support

Need help with this NetSuite issue?

Custom Fields, Records & Forms consulting and configuration support

Talk to a consultant