Audit Table Feature

0
What options do we have in Mendix to capture field level audit tracking? We currently have a PE entity that captures and stores roughly 50 fields of data and would like to track which fields are adjusted after the initial save. In former roles, we would create a separate audit database table and use triggers to move old/new values into the appropriate fields. The audit table would be mapped through a record interface and exposed as a list of operations for users to see. Looking to hear thoughts and opinions from the community, thanks.
asked
2 answers
0

In mendix there's a free, built-in module Audit Trail that does exactly what you're asking for. I'd recommend starting there unless you have a specific compliance requirement that needs something heavier.

The Audti trail also have the IncludeOnlyChangedAttributes constant set this to true so it logs only changed members instead of every attribute on every save.

and It also have a pre build snippet LogOverviewSnippet you can use this to show logs.

for more use this docs : https://docs.mendix.com/appstore/modules/audit-trail/

answered
0

The AuditTrail.LogLine entity mainly stores information about which member was changed (for example, System.UserRoles), but the old and new values are typically stored in the Audit Trail detail records.

If you're using the Marketplace Audit Trail module, you don't need to implement this yourself. The module already provides the required functionality.

A few things to check:

  • Ensure you've added the Audit Trail microflows (Before Commit / After Commit) to the entities you want to audit. These microflows capture the attribute changes.
  • The module includes a page/snippet called LogLineDetailsSnippet, which displays the Old Value and New Value for each audited change.
  • You can also use the provided Audit Trail Overview page instead of building everything from scratch.

The following entities are used by the module for storing and displaying the audit details:

  • BCo_AudittrailSuperClass
  • BDe_AudittrailSuperClass

If you're only displaying AuditTrail.LogLine in a Data Grid, you'll see information such as the changed member and timestamp, but not the detailed before/after values. Those come from the associated detail records displayed by LogLineDetailsSnippet.

Kindly mark this as the accepted answer if it helps.

answered