Extending the use of the Mass Update feature


If you have been using NetSuite for any length of time, you may be familiar with the Mass Update feature. If you haven’t looked recently, the list of pre-built updates in NetSuite has grown considerably. It is worth the time to look over the additional types of updates available. To view all the update types go to: List>Mass Update>Mass Updates.

Common Mass Update Uses
If you are new to mass updates, the following is a short list of the most commonly used mass updates.

Custom Updates
NetSuite’s predefined mass updates do not include all fields on each record type available to update. For instance, fields available on the sales order record are limited to those found on the main section of the sales order. If the field you wish to update is on a tab, that field will not be available. In this case you have two options, either modify the form by moving the location of the field to the main section or create a custom mass update. The mass update list of fields only displays those fields on the main section.

Tip Image 1
Click image to enlarge

ustom mass updates allow you to update virtually any field on a given record. Additionally, custom mass updates can incorporate dynamic update logic. Based on conditions at run time, the update value can be calculated. This feature can be very helpful. For instance, a custom mass update could summarize data, perform formulas and pull data from other records and more. This ability is ultimately very powerful for conditional updates.

NetSuite recently released a new type of script called an Action Script. Action Scripts are used exclusively with the mass update feature and they work in tandem. The mass update component allows the everyday user to control which records to update and schedule the update, while the action script component determines which field to update and the value.

Before NetSuite released this capability, a developer would be required to write additional code to first search the records to be updated before updating the value. The scripting effort took much longer and typically could not be managed by most non-technical users. With action scripts, the code is often limited to 5 to 10 lines of code. The mass update feature simplifies the scope of the script to only updating and calculating.

Once a custom mass update is created it will show up under the custom updates folder shown below:

Tip Image 2
Click image to enlarge

Use Case
In this simple example a company changed their criteria for the classification of sales transactions into business lines. Historical transactions were out of step with the new classification rules and needed to be updated. The business line field was not an updatable field choice using the standard mass update. Using a custom action script, users were able to update all the applicable records. The user is provided a drop down parameter to select the new value for business line.

Tip Image 3
Click image to enlarge

This is the code used to update the business line field:

Tip Image 4
Click image to enlarge

As you can see, only four lines of code were required for this script. Most of the complicated work is eliminated by the mass update definition. The user controls which records are updated when setting up the mass update.

Although this example is simple, action scripts can become very powerful by expanding the logic included in the script.

Additional information on configuring action scripts and more sample code is found in the NetSuite help menu. If you have questions, contact Explore for a free evaluation of possible custom mass update solutions.