How-to with Woo: Triggering a Workflow in NetSuite via Inline Edit

I recently had a colleague bring up an interesting scenario that I wanted to share this month. His client had an existing NetSuite workflow (Suiteflow) that updated or set field values on that particular record when the record was saved when a dependent field was set. Basically, they have a single field that initially is blank/null and when someone sets a value, it triggers the workflow into action and performs additional actions setting other defaults across that record. For those that have created their own workflows, this is a common automation rather than using suitescript.

After months of successfully using this workflow they wanted to introduce a quality of life change for the staff responsible for updating this triggering field, because the workflow would only trigger when you updated the individual record through the UI or they had to prep a CSV file or do a mass update sometimes for a few records. However, they wanted to utilize an inline edit option for their staff because they already had a saved search to track those records that were eligible for the change. The idea was to use this search and update those records that needed action directly from the results and have the workflow perform their actions as if they were editing the record and clicking save.

Required Setup:

  1. A workflow and actions that are triggered by one of the following events “Before Record Submit” or “After Record Submit”.  This is key, as any other events will not trigger the workflow and/or actions.
  2. Saved Search listing records you wish to update making sure your triggering field is displayed as a result column, reminder this search must be the same record type as your workflow

Working Example:

I have a simple workflow example to demonstrate this with a workflow that is against the customer record. In this scenario, all customers, when created, are first given payment terms of ‘Due on Receipt’ until an internal process is conducted and if passed they are given ‘Net 60’. The workflow monitors a checkbox on the customer and when checked and saved, the workflow will update the payment terms for that customer to ‘Net 60’.

I have a Saved Search displaying customers currently under review. Inline edit is on and the checkbox field is displayed as a column:

The workflow has been updated to recognize changes via inline edit. These changes are:

Trigger Type = After Record Submit
Event Types = Direct List Edit (needed), Edit (so the workflow will still work in the original manner)
Contexts = User Event Script (needed – this is how NetSuite sees the inline edit), User Interface (so the workflow will still work in the original manner)

Now when I update my list, the workflow will trigger. Note that because the search is a query at the point in time and not a live reflection you will need to rerun the search to capture the changes.

Triggering a Workflow in NetSuite

After refresh, you’ll see the total is now one less, and ‘3D Printing Inc’ is no longer listed:

Triggering a Workflow in NetSuite

Customer Record after:

NetSuite Workflow

Give it a try, consult SuiteAnswers, and if you’re stuck don’t hesitate to get in touch with one of our highly skilled NetSuite Consultants! 

Written by

Larry Woo

Principal Consultant, NetSuite

Let's Get Started