Brugermanual
What is Change Log and how to set it up?
With Change Log you can track all direct modifications a user makes to data in the database. You specify each table and field that you want the system to log, and then you activate the change log. The change log is based on changes that are made to data in the table that you track.
Find out more about Change Log.
Setup
- In the BC search box, type “Change Log Setup.”
- On the Change Log Setup page, click “Setup” -> “Tables.”
- Here, you will find a list of BC tables. You can select tables and configure them to record insert, modify, and delete logs. Tables can be filtered by ID or name.
- Within the table setup, you have the option to choose “All Fields” to record change logs for all fields on the table, or “Some Fields” to record change logs for specific fields. When selecting “Some Fields,” click on the assistedit button to display available table fields. Select the tick box for each field. In the “Log Modification” logs will be recorded for the Name, Contract and Credit Limit fields on the customer table.
- Once you have finished setting up, navigate back to “Edit” -> “Change Log Setup” -> “Change Log Activated” button.
- It’s important to close and reopen the BC session for the change log to start recording according to the setup!
Change Inspector (Alt+C)
You can simply download BC X-RAY extension for Dynamics 365 Business Central on Microsoft AppSource. After successful installation of the extension, you can now use the main functionality of BC X-RAY – Alt+C to view your insight on all pages.
Prerequisites include the installation of BC X-RAY and activation of the change log setup (for on-prem). Additionally, the user must have made some changes in the system previously and must have permission to set up BC X-RAY.
After installing BC X-RAY, you can navigate to any standard page and select the record which you made previous changes, ensuring that change log tracking is activated for that table – you just have to click “Alt+C” – Change Inspector. You will then see that changes were made to this record, whether by you or other users.
On the right side of the screen, you can see the fact boxes that will provide you with the information about the setup that you have for the current table.
Change Log Setup
In the first factbox “Change Log Setup” you can see whether change log tracking is activated and the change log setup for the current table. Clicking on the setup link on the factbox will redirect you to the change log setup (table) list. Here, you can view the filtered change log setup table list and modify which changes should be tracked
Hidden Fields
In the second factbox “Hidden Fields” you can see if you or your administrator have set up filters for change log, which should be visible on current page (Change Inspector). Clicking on the value “User fields filters” will redirect you to the page where you can modify these filters. Clicking on “Field No. filter” field, will redirect you to the list of all fields for the current table, where you can choose which fields you do not want to see when using the Change Inspector page. Once you select some fields and click OK, these fields will be excluded from the page.
You can also set up “Hidden Fields Filters” which are only visible to the filter administrator (explained in “Change Log User Setup”). These filters are used when you want to restrict specific user from seeing changes to some fields.
Table Field Setup
In the BC X-RAY you can also set up whether the user should be notified, restricted, permitted, or if a reason should be required when a field is changed. This setup can be viewed in the third setup factbox on the right side of the screen. Clicking on “Setup” in the third factbox “Table Filed Setup” will redirect you to the setup card for the current table and field.
Notification
If you wish to notify users about changes in a particular field, you must activate “email notification”. Then, navigate to action pane -> “Related” -> “User Notification Setup” to configure which users will receive notification about the changes. Additionally, you can specify whether a user should be notified about a specific type of change. For instance, if you want a user to be notified when an item is blocked you can write in to “Changed To” field “yes” in your language or in any language you can write “true”. You can also determine whether users should be notified about changes from a blank value by activating the “Notification on changes from Blank” field.
In BC X-RAY, you can decide whether a change should be considered part of the record creation process by using the “Notification Delay” field. Furthermore, if you wish to be immediately notified about changes in fields that are of high importance to you, you can set the “Notification Send” to “Immediately”. Conversely, for less critical fields where you prefer to have an overview of changes, you can specify “Notification Send” to either “Hourly” or “Daily”.
Restricted/Permitted
If you wish to restrict a user from changing the current field, you can activate this by enabling the “Restricted” field. Additionally, you can navigate to actions pane -> “Related” -> “Restricted Users” to specify who should be restricted and view the current restricted users list. Similarly, you can permit users to change the current field. This would be applicable in scenarios where you want to restrict all users except one. In such cases, instead of selecting all users to be restricted, you can choose just one or more users who are permitted to make changes to the current field.
Reason
If you also require users to provide a reason for the change when modifying the current field, you can activate the “Reason Required” option. Furthermore, if you want a reason for changes from a blank value, you must activate the “Reason Requirement on changes from Blank” setting.
Entries by User
This factbox displays the number of times the user has made changes to the current record. These numbers are calculated based on the filters set using the “Hide Current Field” action or by actions that filter by “Type of Change.” Clicking on the number will allow you to view the changes made by that user.
Entries by Fields
This factbox displays how many times the field has been changed on the current record. These numbers are calculated based on the filters set using the “Hide Current Field” action or by actions that filter by “Type of Change.” Clicking on the number will allow you to see the changes made to that field.
Remote Setup
This factbox indicates whether Cosmos integration is activated and whether remote entries should be displayed on the page. Clicking on “Setup” will redirect you to the “Advanced Change Log Setup” page. Clicking on “History” will show you the changes made to that setup.
Additionally, in this factbox, you can view the number of local and remote change log entries loaded on the page. This count is not based on any filters. Furthermore, you can observe the status of the “Upload Job Queue entry.”
Email Notification Received
In case that you have set up notification you will see who and when received email about this specific change.
Actions on Change Inspector
There are number of actions:
- “Find Change Log Entries”: This action opens a page where you can select multiple filters to find specific change logs.
- “Print”: Allows for printing.
- Actions designed to provide a better overview of change log entries on the page.
- “Hide Current Field”: Hides the currently selected field. Filters set up with these actions can be saved in the setup and will be automatically hidden when accessing the Change Inspector page with the same table. Global users can set up filters that apply to each user. To view hidden change logs, use the “Clear All Filed No. Filters” action which will reset all filters set up by this functionality. Clicking on “Clear All Field No. Filters” change log entries that were hidden and will be highlighted in “Field No.”. Bold red coloring indicates entries filtered by global filters, while light red coloring represents entries hidden by your filters.
- “Reset Filed No. Filters” reapplies filters from setup.
- “Field No. Filters Setup”: Opens the “Filed No. Filters Setup” page, where you can see filters for your user and in case you are a global user you can also see the global filters. You can modify the filters by clicking on “Filed No. Filter” filed value. This will open a new page that is called “Select Fields”. In case that you already had some filters set up you will see only these. By clicking on “Show all” action you will see all the fields available for the current page. By clicking on “Selected” you can choose which field number you do not want to see on the Change Inspector page. When you are done selecting you can click OK, and it will be saved. If you also click OK on “Field No. Filters Setup” then the filters will be automatically applied on Change Inspector page.
- You also have the possibility to filter by “Type of Change”. This can be done by the actions in next group where you can select “Modification” “Insertion” and “Deletion” or all.
- In “Actions” –> “Trace Current Filed”: Highlights the current field for better tracing of changes.
- In the “Related” section, there is the “Advanced Setup” action, which provides access to “Advanced change log setup”.
- “Table No.”: Choose wanted table and it will only show the changes for the selected table.
- “Primary Key Filters”: Dynamically shown based on the selected table. For example, if you choose the customer in the “Table No.” only one filed will be shown in the “Primary Key Filters” “No.” If you choose “Sales line” in the table number and this will show different “Primary Key Filters.”
- “Field No.”: Filter by specific field number. There is also an option to filter what was changed from and changed to.
- Filter on “Type of change” by activating “Filter on Change Type” and selecting “Type of Change”.
- “From” and “To” date and time filters: See what changes have been made in the selected period.
- “Username” filter: To see the changes made by a specific employee.
- Cosmos users: Can specify whether to search the “Local” or “Remote” database.
- Continue (find, show related record, reset filters advanced setup) + setup.
Below the “Find Change Log Entries” page, you have the access to multiple actions:
- Click on the “Find” action and it will filter through the change logs using filters which were set up in the header. This displays a list of change log entries found within the selected filters.
- Clicking on “Show Related Record” prompts you to the page from where you can access the card for the related record.
- “Reset Filters” resets all the filters and deletes all the entries that were found.
- “Advanced Setup” opens “Advanced Change Log Setup” page.
“Advanced Change Log Setup“
In a group “Local Database” you can find information about the change log entries that are stored locally. For example, “Number of Records” shows the number of change log entries saved in the local database.
“Last Update by Refresh Calculations At” shows when the “Refresh Calculations” was executed.
“Oldest Data Created At” reflects the timestamp when the first change log entry was created among those stored locally.
“Newest Data Created At” shows the timestamp of the most recent change log entry created among those stored locally.
In “Timelapse for Change No.” you can specify time in seconds that affects the change number displayed on the Change Inspector page.
“Remote Database”
In “Remote Database” section you can specify the necessary information for connecting to the remote database.
“General”
“Active”: Specify whether the upload to remote database is activated.
“Number of Records”: Indicates the total number of change log entries saved in remote database.
“Last Upload At”: Displays the timestamp of the last upload execution.
“Remaining Records to Upload”: Shows the number of change logs yet to be uploaded to Azure Cosmos Database. This is calculated based on the setup.
“Remaining Upload Duration”: Estimates the approximate time required to upload remaining records to the remote database.
“Azure”
“URL”: Enter the connection string to your Azure Cosmos database, which can be obtained from your provider.
“Primary Key”: Specify the primary key for Azure Cosmos Database, which can be obtained from your provider.
“Change Logs”
“Database Name” and “Container Name”: Provide information about the database in Azure Cosmos, which can be obtained from your provider.
If the “Show on Advanced Change Log Page” is activated, change log entries retrieved from the Azure Cosmos database will also be displayed on the Change Inspector page.
“Transfer Sequence”
In the field “Transfer Entries Older Than” you can specify how many days old the change log entries should be before it will be transferred to Azure Cosmos. For example, if set to 3 days, only the change log entries older than 3 days will be transferred to Azure Cosmos.
You can also define the “Maximum No. of Entries Transferred at Once” to determine how many change log entries should be transferred in each upload runs.
If “Transfer System Tables” is activated, then the tables in the 2 billion range will be transferred.
If “Delete Local Data on Upload” is activated, then change log entries transferred to Azure Cosmos will be deleted from local database.
“Upload Job Queue Entry” section shows the information from the Job Queue Entry related to the upload process.
“Advanced Change Log Setup” Actions
“Standard Setup” action will open change long setup page.
Clicking on “Tables setup” action will open “Change Log Setup (Table) List”.
“Table Field Setup” will open “Table Field Setup” page which is described above in the doc.
Using the “Field No. Filter Setup” action will open the “Field No. Filter Setup” page with all setup filters visible.
“Factbox Visiblity Setup” action will open the page “Factbox Visiblity Setup” where you can specify which Factboxes to display on the Change Inspector page.
Clicking on “User Setup” action opens a page where you can set up which user is “Filter administrator” and/or which user should receive usage report.
“Assisted Cosmos Setup” action will open a page “Cosmos Connection Setup Wizard” which will guide you through the advanced change log setup.
“Open Job Queue Entry for Upload” will open a standard job queue entry card page.
“Delete Job Queue Entry for Upload” will delete a job queue entry for upload.
In “Related” section, you can see multiple actions: “Find Change Log Entries” will open “Find Change Log Entries” page.
“Change Long Entries” action will open standard “Change Log Entries” page.
The last action “Change Long Entries” will open Change Inspector page.
There are four extra fields:
“Transfer to Remote”: Specifies if the table should be transferred to Azure Cosmos during the upload.
“Change Logs Exists”: When checked it means that change log entry exists for the current table.
“First Change Date/Time” and “Last Change Date/Time”: Show when was the first and the last change log entry for the current table created and it is still saved in the local database.
Actions
On the same page clicking on “Change Log Advanced” an action pane opens where you can see several options:
“Change Log Entries for Setup”: Shows changes for the current record.
“Transfer- Activate Marked”: Activates transfer to remote for all tables that are marked and are setup for change log tracking.
“Transfer- Deactivate Marked”: Deactivates transfer to remote for all tables that are marked and are setup for change log tracking
“Add Default Settings on all”: Adds setting from the imported file only for tables not previously set up.
“Add Default Settings on Unspecified”: Adds settings from the imported file only for tables not previously set up.
“Table Field Setup”: Opens “Table Field Setup” page for all tables.
TBC Process BC X-RAY Usage
When the Inspector Page is utilized, usage log is created automatically. You can manage these logs by configuring the “TBC Process BC X-RAY Usage” codeunit as a job queue. Within the “Parameter String,” you specify actions for the logs: “Send,” “Delete,” or “Send & Delete.”
“Send” entails sending an email first day of a month with all usage logs since the inception of BC X-RAY usage up to that day.
This email is dispatched to users who have opted to receive usage reports in the “Change Log User Setup.”
“Delete” will delete all usage logs on the first day of a month with all the previous usage logs saved from the beginning of BC X-RAY usage.
“Send & Delete” will send an email with all usage logs on the first day of a month and automatically will delete all the usage logs from the database.