Batch Processing History
Introduction
Every batch process you execute through Erik's ToolBox is recorded in the history system. This provides a complete audit trail of all bulk data modifications, including what was changed, when it was changed, who made the change, and how many records were affected. The history system is essential for compliance, troubleshooting, and accountability in your Business Central environment.
This guide explains how to access, interpret, and manage your batch processing history.
Accessing the History
Batch Processing History Page
The primary interface for reviewing batch processing history is the Batch Processing History page. You can access this page through the Erik's ToolBox menu or by searching for "Batch Processing History" in the Business Central search bar.
This page displays a list of all batch processes that have been executed, with each entry representing a single batch processing run. The list is sorted by execution date, with the most recent entries at the top.
Records Modified Page
For a more granular view of individual record changes, you can access the Records Modified page. This page shows the specific records that were modified during a batch process, including the before-and-after values for each changed field. You can navigate to this page from a history entry on the Batch Processing History page to drill down into the details of a specific batch run.
What Is Recorded
Each batch processing history entry captures the following information:
Process-Level Details
- Date and Time: The exact timestamp when the batch process was executed. This allows you to pinpoint when changes were made in your system.
- Table: The name and number of the table that was modified. This tells you which area of your Business Central data was affected.
- Filters Applied: The complete set of filter criteria that were used to select the records for modification. This information is stored in the Batch Processing Filters table and is linked to the history entry.
- Fields Modified: The specific field or fields that were changed during the batch process, along with the replacement rules or new values that were applied.
- Record Count: The total number of records that were processed and modified by the batch run.
- User: The Business Central user who executed the batch process. Since the SUPER role is required, this will always be a user with administrative privileges.
- Company: The company context in which the batch process was executed.
Record-Level Details
For each individual record that was modified, the system captures:
- Record Identifier: The primary key values that uniquely identify the record within the table.
- Field Changed: The specific field that was modified on this record.
- Previous Value: The value the field held before the batch process changed it.
- New Value: The value the field was changed to by the batch process.
This record-level detail is accessible through the Records Modified page and provides the granular information you need for detailed auditing.
Reviewing Changes
Viewing Process History
To review the history of batch processes:
- Open the Batch Processing History page.
- Browse the list of executed batch processes. Each row represents a single batch run.
- Review the summary information for each entry, including the date, table, record count, and user.
- Select an entry to view its full details, including the complete filter criteria and field modification rules.
Viewing Individual Record Changes
To review the specific records that were changed during a batch process:
- Open the Batch Processing History page and select the batch process you want to investigate.
- Navigate to the Records Modified page from the selected history entry.
- Browse the list of modified records. Each row represents a single record that was changed.
- Review the before-and-after values for each record to confirm that the changes were applied correctly.
Comparing Before and After Values
The Records Modified page displays the previous value and the new value for each modified field on each record. This side-by-side comparison allows you to:
- Verify that the intended changes were applied correctly.
- Identify any unexpected changes that may indicate a configuration error.
- Provide evidence of the exact state of the data before and after the batch process for audit purposes.
When reviewing before-and-after values, pay attention to:
- Records where the previous value was already equal to the new value, which may indicate that the filter criteria were too broad.
- Records where the new value appears incorrect, which could signal a problem with the replacement rules or AL code used in the batch process.
- Patterns across records that might reveal systematic issues with the batch configuration.
Using History for Audit and Compliance
The batch processing history system serves as an important component of your organization's data governance framework. Here is how you can use it for audit and compliance purposes:
Internal Audits
When conducting internal audits of data changes in Business Central, the batch processing history provides a centralized record of all bulk modifications. Auditors can:
- Identify all batch processes executed within a specific date range.
- Verify that batch processes were performed by authorized users.
- Review the scope of changes by examining the filters and record counts.
- Drill down into individual record changes to validate the accuracy of the modifications.
Regulatory Compliance
For organizations subject to regulatory requirements around data integrity and change tracking, the batch processing history provides documented evidence that:
- Changes were made through a controlled process with multiple confirmation steps.
- The identity of the user who made the changes is recorded.
- The exact nature and scope of the changes are preserved.
- Before-and-after values are available for every modified record.
Change Documentation
You can use the history system as a reference when documenting changes for stakeholders. The combination of process-level summaries and record-level details gives you everything you need to create comprehensive change reports.
Managing History Entries
Retaining History
By default, all batch processing history is retained indefinitely. This ensures that you always have access to the complete audit trail of bulk data modifications. However, over time, the volume of history data may grow, and you may want to manage it to maintain system performance.
Clearing Old History Entries
If you need to remove old history entries, you can do so through the Batch Processing History page. Before clearing any history, consider the following:
- Retention policies: Check whether your organization has data retention policies that specify how long change history must be preserved. Deleting history entries prematurely may violate compliance requirements.
- Archiving: Before deleting history entries, consider exporting the data for archival purposes. This allows you to free up space in your Business Central database while still retaining the information for future reference.
- Selective deletion: Rather than clearing all history, consider deleting only entries that are beyond your required retention period. This preserves recent history for operational purposes while reducing the volume of older data.
To clear history entries:
- Open the Batch Processing History page.
- Apply filters to select the entries you want to remove, such as filtering by date range.
- Select the entries and delete them using the standard Business Central delete action.
Note that deleting a history entry also removes the associated record-level details from the Records Modified records.
Exporting History Data
You can export batch processing history data for external storage, reporting, or analysis. Business Central provides several options for exporting data:
- Excel export: Use the standard Business Central "Open in Excel" or "Edit in Excel" functionality to export history entries to a spreadsheet.
- Reporting: Create or use existing reports that pull data from the Batch Processing History and Records Modified tables.
- Data integration: If your organization uses data warehousing or business intelligence tools, you can include the batch processing history tables in your data extraction processes.
When exporting history data, include both the process-level entries from Batch Processing History and the record-level details from Records Modified to maintain the complete picture of each batch process.
Troubleshooting with History
Identifying Incorrect Changes
If you discover that a batch process made incorrect changes to your data, the history system is your primary tool for understanding what happened and planning corrective action. Follow these steps:
- Locate the batch process entry on the Batch Processing History page. Use the date, table, and user information to find the relevant entry.
- Review the configuration of the batch process, including the filters that were applied and the replacement rules that were used. This helps you understand what the batch process was intended to do.
- Examine the record-level details on the Records Modified page. Look at the before-and-after values to understand exactly what changed.
- Assess the scope of the incorrect changes by reviewing the record count and the specific records affected.
Planning Corrective Action
Once you have identified the incorrect changes using the history system, you have several options for correcting them:
- Run a reversal batch process: If the previous values are clearly documented in the history, you can configure a new batch process that sets the affected field back to its original value. Use the same filters that were applied in the original batch process to target the same set of records.
- Manual correction: For a small number of affected records, it may be more practical to correct the values manually through the standard Business Central interface.
- Targeted correction: If only a subset of the records were incorrectly modified, apply more specific filters to target only those records for correction.
In all cases, document your corrective actions and reference the original batch process history entry so that the audit trail remains complete.
Analyzing Patterns
Over time, your batch processing history can reveal patterns that may be useful for improving your data management practices:
- Frequency of changes: If you are running similar batch processes repeatedly, consider whether a more permanent solution, such as a workflow or automation, would be more appropriate.
- Common errors: If incorrect batch processes occur periodically, review your process for configuring and reviewing batch runs to identify where the errors are being introduced.
- User activity: The history can help you understand which users are performing batch modifications and whether additional training or documentation might be beneficial.
Connection to the Audit Trail System
The batch processing history integrates with the broader audit trail capabilities in Erik's ToolBox. While the batch processing history provides detailed information specific to bulk data modifications, the general audit trail system captures a wider range of changes across your Business Central environment.
When you review batch processing history, you can cross-reference entries with the general audit trail to get a complete picture of all changes that occurred around the same time. This is particularly useful when investigating data issues that may have multiple contributing factors.
For more information about configuring and using the audit trail system, see Setup and Audit Trail.
Data Storage
The batch processing history system relies on three key tables:
- Batch Processing History: Stores the process-level history entries, including the date, table, user, and record count for each batch run.
- Batch Processing Filters: Stores the filter criteria associated with each batch process. These are linked to the corresponding history entries so you can always see what filters were applied.
- Batch Processing: Stores the process configuration, including the target table and field modification rules.
These tables work together to provide the complete picture of each batch process from configuration through execution and results.