Quantcast
Channel: Dynamics Communities
Viewing all articles
Browse latest Browse all 940

Working with the Change Log in Business Central

$
0
0

Not many people relish change. Even worse is when change occurs for which there is no explanation. Luckily, within Business Central (BC), users have the option of tracking changes that are being made to data in the database tables. In this post, we’ll discuss how to set up the Change Log, when to use it, and how to view the results.

Setting Up the Change Log

Business Central includes the ability to track changes to table fields. This ability is able to capture the user who made the change, when the change was made, the table and field(s) that were changed, and what the change was. We’ll dig more into this later on. For now, let’s review how to set up the change log.

The first step is to navigate to Change Log Setup. Once the page opens, click on Setup/Tables from the menu. The system will display all the tables available in the change log, which is pretty much all of them. For each table, you will determine two things:

  1. What type of change to capture
  2. Whether to track changes to all the fields or only some of them
Overview of the Change Log Setup (Table) List

As you can see, there are three types of changes which can be tracked:

  • Log Insertion: Create a log entry when the field value is inserted into the table
  • Log Modification: Create a log entry when a field value is changed or modified
  • Log Deletion: Create a log entry when a field value is deleted

You don’t necessarily need to capture all three types for any particular field. For example, you might only be interested if values are changed and not created or deleted. In this case, you would only set up the Log Modification settings.

When selecting the fields to track, you also have three options:

  • Blank: If you leave the field blank, no changes will be captured
  • All Fields: Changes in all fields will be tracked
  • Some Fields: Only changes to selected fields will be tracked

In order to select the fields to track, set the option for the type as Some Fields. Once set, a box with three dots will appear in the field. Click on that button to open the field list (see below).

This will open a page listing all the fields in the table and allow you to select which fields you want to capture changes for and what type of change to capture. Just check the box by the desired field.

Select the three dots to open the field list

When ready to use, return to the Change Log Setup page and click the box next to Change Log.

Activated to start capturing changes. Note: Any user currently in the system (including yourself) will need to restart their session for changes to start being captured.

When to Use

Now that we’ve talked about how to set up the change log, let’s review when to use the log. At first, you may say, “I’m just going to capture every change being made.” This is a really bad idea because the change log will start to fill with tons of entries that will never be looked at, making the change log entry table unusable.

When you opened the Change Log Setup page, you may have noticed some “Important” notes. These give some good insights into when to capture changes.

Be mindful of the “Important” notes

In determining what tables and fields to track, remember that less is more. The purpose of the change log is to track when something changed, presumably because you may be concerned about unexpected changes. Let’s review some best practices:

  • Generally, you would only track changes to master tables (i.e. items, customers, vendors, etc.) and setup tables (i.e. G/L Setup, Sales C Receivable Setup, etc.). This is where most of the changes will occur that you may want to track.
    • Even then, use “All Fields” sparingly. You may not be using all the fields, so why track changes to fields you don’t care about.
    • Many master tables include fields that BC will change frequently as part of the system. These include Last Modified fields and quantity, cost or amount fields. These should not be tracked.
  • Don’t track changes to ledger entry or posted document tables. By design, fields in these tables don’t really change, so why track changes.
  • Don’t leave the tracking for a table or fields on indefinitely.
    • As noted previously, the change log is used to capture changes because you may be seeing some anomalies in the data. Once that anomaly has been identified, you should turn the change log off for that data so as not to fill the change log entry table.
  • There is some debate on whether to track changes to fields in open document tables such as sales or purchase orders. While the archive tables do capture the results of certain changes at certain times, you may want to turn the change log on for those tables if you are concerned about unexpected changes to data.

Reviewing Entries

To review the results, navigate to the Change Log Entries page. From here, you can filter for the table and/or field you want to view the results for. As you review the results, you will see that the log captured who and when the change was made, what was changed, and the old and new values.

Change Log Entries page

Please note that this table is notoriously large and slow. When filtering for results, the system can take a long time to return the results you are looking for. Because of this, you will want to be careful about how many tables and fields you are tracking. In addition, you will want to use retention policies to control when records contained in the table are deleted. Retention policies will be reviewed in a future article.

Summary

Chasing down why data is changing can be challenging. The Change Log can help with that investigation. When used properly, the system will provide you with the information about data changes that you need.


The post Working with the Change Log in Business Central appeared first on Dynamics Communities.


Viewing all articles
Browse latest Browse all 940

Trending Articles