<img src="https://ws.zoominfo.com/pixel/5BFMW73xT6Cu70sN1cUt" width="1" height="1" style="display: none;">

Workflow Instance and History Record Management

Posted by Kevin Suh, NetSuite Administrator on Aug 10, 2023 3:58:44 PM
Kevin Suh, NetSuite Administrator
pexels-photo-6457478

Did you know you can experience unexpected errors across different transactions due to the overwhelming number of workflow instance history? Based on your workflow setup (keep instance and history option), it can generate billions of unnecessary instances which cause performance issues on the database.

Active workflows can generate a large number of workflow instances and history records. The following records are usually generated when a workflow executes:

  • An instance record is generated every time a workflow starts a new execution on a record.
  • A history record is generated for every state that the workflow enters and exits for each record on which the workflow executes.

 

There are multiple scenarios that can generate a large number of workflow instances and history records. The following are some of the most common:

  • One-state workflows run every time a record is displayed. (This is the most common cause.)
  • Complex workflows that have a lot of states and execute on numerous records.
  • You have used NetSuite for a long time and have not deleted any workflow instances or history records.

The accumulation of too many workflow instances and history records can negatively impact NetSuite's performance. For example, you may begin to notice slower-than-usual processing or unexpected behavior.

 

You can adjust settings for workflows to avoid the accumulation of too many workflow instances and history records. The following best practices can help you to manage your workflow instances and history records to avoid possible negative performance.

  • When you create new workflows, consider disabling workflow history or setting it to only save records during workflow testing.
  • Regularly delete workflow instances and history records that you do not need to keep.

 

How to disable the History for a Workflow? You can use the Keep Instance and History dropdown list to specify if instance and history records are saved for workflows. Workflow history records take the form of execution and error log records. In the Keep Instance and History dropdown list, you can select to save workflow instances and history records Always, Never, or Only When Testing. You can access the Keep Instance and History dropdown list in the following places:

  • Workflow Definition Page page
  • Editing a Locked Workflow popup window

 

By default, the Only When Testing option is selected when you create new workflows. Be aware that history records created prior to 2018.1 are saved for existing workflows. You can delete records for these workflows using the Instances and History Records popup window.

When you select the Never or Only When Testing options, you can view workflow instance and history records on the record's Active Workflows Subtab and Workflow History Subtab subtabs while the workflow runs. After the workflow finishes or is canceled, the history records related to the workflow instance’s execution are deleted from the database. When you select the Always option, history records related to the workflow instance’s execution are saved in the database. Be aware that history records are never deleted for workflows that transition to a state with the Do Not Exit Workflow box enabled.

 

One of the benefits of not saving history records for workflows that process many records can be improved system performance. Workflows that process many records produce a large amount of history records that can slow system performance. Additionally, a large amount of database space can be freed when you delete workflow history records.

To disable history for a workflow:

  1. Go to Customization > Workflow > Workflows.
  2. On the Workflows page, click Edit next to a workflow for which you want to disable history.
  3. In the context panel, on the Summary tab, click the Edit icon.
  4. On the Workflow Definition window, in the Keep Instance and History dropdown list, click Never.
  5. Click Save.

 

How to delete the Workflow Instances and History Records? History records are created each time a workflow moves into a state, including the first state of the workflow. You can delete workflow instances and history records for finished workflow instances and view statistics on the Instances and History Records popup window. Workflow instances and history records are deleted based on the length of time, in months, they have been stored. 3 months is the default setting, but you can specify a different length of time to base the deletion. The number of active and finished workflow instances displayed in the Statistics section on the Instances and History Records popup window is an estimate and not an exact total. The number of active and finished workflow instances is rounded down to the closest number of instances and records.

 

To delete workflow instances and history records:

  1. Go to Customization > Workflow > Workflows.
  2. Click Edit next to the workflow that you want to delete workflow instances and history records.
  3. From the More menu, select Instances and History Records.
  4. In the Instances and History Records popup window, in the Delete section, enter the number of months for the age of the workflow instances and related history records that you want to delete. To delete all of the workflow instances and related history records, enter 0.
  5. Click Delete.

 

To see the status of the deletion process, from the More menu, select Instances and History Records. Statuses include Scheduling, Waiting for execution, and the progress of the deletion process. It can take days to delete a large number of history records. Only one deletion process is run at a time. If you initiate multiple deletion processes, they are queued in the order that they were initiated. The deletion process begins when the preceding deletion process is finished. A record of the deletion process is logged on the History tab on the Workflow Definition page. When the deletion process is complete, an email is sent to the user who initiated the deletion process.

If you want to learn how to troubleshoot the unexpected error or timeout issue on the viewing list in Netsuite, please contact Concentrus today to discuss your needs.

 

 

 

 


 

 

 

About Us

Concentrus is a leading provider of innovative cloud-based enterprise resource planning (ERP) solutions, including NetSuite. Our team of NetSuite experts offers a range of services, including NetSuite price analysis, NetSuite training, and NetSuite integration services.  

Our goal is to help businesses of all sizes maximize their investment in NetSuite by providing expert NetSuite cost optimization and implementation strategies. With years of experience as a NetSuite partner, our NetSuite administrators and NetSuite consultants are well equipped to help businesses of all sizes with their NetSuite consulting needs.  

Whether you're looking for a NetSuite consultant to help with your NetSuite implementation or you need ongoing NetSuite support, Concentrus is here to help. 

 

Read About Our Implementation Methodology

 

Want more NetSuite Tips and Tricks? Check out our Short & 'Suite videos

 

Tags: NetSuite, ERP, Reporting, NetSuite Partner, NetSuite How To's, NetSuite Tips, Workflow Instance, Record Management, History Record

Subscribe to our blog!

Recent Posts

Posts by Topic

see all

Request a quote