Create Record Action - Part 1

09/29/2023 10:05 AM - By MavenCloud

We are continuing through our deep dive into each workflow action Netsuite in this Workflows for Beginners Series.  The next action to cover is the Create Record action.  In previous posts we covered the Go to Record action which can be used in a similar fashion, but allows the user to interact with the record while also creating a new one at the same time.  With the Create Record action you can simply create a new instance of a record type using both the normal triggers and also from the Item sublist on transactions.  In this post we will cover the Create Record action when used within the normal context of a workflow and not the sublist action group.

The Create Record action can only be used with server based triggers to ensure that there is no data lost during the client interaction with the form.  For more information on workflow triggers read our blog post on Triggers, Contexts and Event Types.  The Create Record action is also limited to only some of the Record Types, but not all.  Most of the limitations revolve around transactions as those are more complicated to create so automating those is a little more difficult.  However, almost any Custom Record, Entity Record or Activity record is available to be created which opens up a world of possibilities for customization and improved efficiency.

In this example we will pair a custom record with a scheduled workflow to store and manage Average Cost for items and how it changes over time.  Average Costing in Netsuite is very helpful and easy to understand when it comes to your inventory value, however, it is a "moving target" as purchasing and sourcing changes over time.  It is hard to know and understand how your costs have changed over time, so we can make a custom record to store this data and report on it later.

  • To start first make a custom record that links to the Item Record and holds the Date and Current Average Cost.


  • Next we need to make a Saved Search that will define all the items we want to track the Average Cost History for.  You can add whatever criteria or Results columns you need to fit your business use case, but for our example we will only track Active items with the Average Costing method.

  • Now we can create a workflow and set it to Scheduled.  Also defining our Saved Search as the criteria.  We will also create this average cost history every month on the 1st day of the month.

  • In our first state we can add the Create Record action
     

  • Because this is a Scheduled workflow we will use the Entry trigger so the custom record is created as soon as the Item enters the workflow


  • In the parameters of the action we will define the following:
    • What record type we want to create (ie. our new Item Average Cost History custom record)
    • The Item assigned to our new custom record (ie. the Current Item being processed)
    • The current date
    • The Average Cost of the Item being processed


  • Now when the workflow runs you can see the custom record is created automatically and attached to each respective Item.

These records will generate automatically for you each month and then you can create a report based on this Item Cost History record that shows how costs change over time.  You can even try to add fields to the custom record to automatically calculate % change, last average cost and anything else you would like to store on a monthly basis.

While this is just a simple example of how to use the Create Record action it can also be used in a more "real-time" sense by using an Event Based workflow instead of a scheduled workflow.  You can add this action into approval workflows if you would like to capture approval history as a custom record.  You can use the Create Record action to create a new custom record at ever state of the approval so you know who was the current user, the date/time and the status change at that time.  This can store much needed information to help you review and track what happened to a record throughout the approval process.

There are many other uses and processes that can be improved by using this powerful action.  What are some ideas or scenarios where you have used the Create Record action?  Put your input and ideas into the comments, we love to get feedback and insights for other Netsuite users.

MavenCloud