Principal Consultant, NetSuite
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.
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.
After refresh, you’ll see the total is now one less, and ‘3D Printing Inc’ is no longer listed:
Customer Record after:
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!
How-to with Woo: Triggering a Workflow in NetSuite via Inline Edit