Previously, in our first post on the Create Record Action we discussed how to use this powerful action to create costing history for items using a scheduled workflow. In this article, we will discuss how the create record action can be leveraged within the Items sublist of a transaction. It is worthwhile to note that the Sublist Action Group only supports 4 actions
- Create Record
- Return User Error
- Send Email
- Set Field Value
In this example, we will build a quick workflow that create an approval task for a single line item. One client I worked with recently requested that certain items need to be reviewed by their design team to ensure the configuration of the item was correct, so they wanted a way to notify the design team when one of these items was ordered AND also not let the item be shipped until the review was complete. To do this we leveraged the Create Record action using the sublist action group for the items sublist on Sales Orders.
First we created a custom checkbox on the item record called "Needs Review"
One other helpful customization is to create a custom Transaction Line field that we can use to store the Task record we will create in future steps.
Then in our workflow we created a sublist action group using the Before Record Submit trigger
Next we added the Create Record action to our sublist action group, ensuring to set the condition to check for the "Needs Review" checkbox on the item record
For the remaining parameters we leveraged the native Task record in NetSuite to generate the review task for the design team. This was especially nice because the native functionality surrounding Tasks allows for easy reminders, notifications and even allows the user to perform the review using their mobile device if they have the NetSuite App on their phone or tablet. The nice thing about the Create Record Action is you can set field values on the newly created record right from the configuration window. As you can see we've set many fields on the Task record like the Title, Message, Due Date, Assigned To, etc.
One other step is to stop the order from being processed. You can do this by either marking the line as Closed or setting the entire order to Closed until the review is complete. Another option is to leverage the Pending Approval status of the Sales Order to leave it and Pending Approval until the review can be completed.
Once last step we can take is to use a Scheduled transition to move this order into a "Review Completed" state. The saved search used as the condition of the transition simply looks for Review Tasks that are marked completed and then if true, triggers the transition.
Then in the new REVIEW COMPLETED state you can remove the "Closed" checkbox from any line to let the order be processed by your operations team.
This solution can be adapted to many different use cases and customized to fit many different applications and requirements. We are always eager to hear how you've used workflows and different actions within your organization. Please take a moment to comment or write us with your ideas. Also we are always available to help with any questions or needs you may have. Please let us know how we can help but clicking the button below.