ANS-0584 · SUITESCRIPT DEVELOPMENT

How to Trigger a NetSuite Workflow Based on Exiting View Mode or Entering Edit Mode?

Leverage custom fields and client-side triggers to manage workflow state transitions in NetSuite.

Short answer

NetSuite workflows do not directly support a 'leaving view mode' trigger. A workaround involves creating a custom field that is populated via a client-side trigger when a record enters edit mode. This custom field's value can then serve as a condition for workflow state transitions, effectively simulating the desired exit trigger.

Scenario

Users often seek to initiate a NetSuite workflow action when a record is no longer in view mode, or when it transitions into edit mode. However, standard NetSuite workflows lack a direct trigger specifically for 'leaving view mode', making it challenging to automate processes based on this user interaction.

Solution

NetSuite workflows do not offer a direct trigger for 'leaving view mode'. To achieve a similar outcome, implement a custom field that is updated when the record enters edit mode.

  1. Create a custom field on the record type relevant to your workflow. This field will serve as a flag to indicate that the record has been in edit mode.

  2. Configure a client-side trigger (e.g., a Client Script or a workflow action with a client-side trigger) to set a specific value in this custom field when the record enters edit mode.

  3. Utilize the value of this custom field as a condition for state transitions within your workflow. This allows the workflow to progress to the next state only after the record has been edited, effectively acting as a proxy for an 'exit view mode' trigger.

Expert NetSuite Support

Need help with this NetSuite issue?

SuiteScript Development consulting and configuration support

Talk to a consultant