I'm building a model driven app for a customer, this customer ask me if it is possible to audit changes when a record change. It's required for the person who's changing the record to give a reason why the record is changed.
Know someone of you what's the best way to achieve this?
Note: It's possible that there are multiple changes.
It would be great to add a timeline to a form with al the changes.
Looking forward to any suggestion, tips or blogs where it's explained how to achieve this.
Thanks in advance.
Yeah, people often ask for a better audit solution than OOB, but it is a complicated topic.
You'll need to think about what your objectives are: Are you just trying to track the data for compliance? Do you need Users to be able to see and read it? Do you need to be able to report on it? Do you need to be able to roll back changes? Each of these objectives will have serious implications about the design of your solution, but *spoiler alert* no matter which you choose you're in for custom coding your answer. OOB will not help you with "justifications".
Hi @cchannon ,
Thank you for your reply.
In this case, it's only required for users to see and read what's changed and why. Roll back is out of scope. Also reporting is at the moment out of scope.
Well, in that case, I guess you can build a human-readable stringified copy of all dirty fields in an onSave event, pop a dialog to request a "justification" then use these values to create a 'change history' record. but if the requirements get more complex you'll need to rework it; the stringified data solution is by far the easiest and least storage-intensive (hence why MSFT does it for the OOB audit logs) but nearly impossible to report on or perform any kind of operation on.
This is a less technical response and instead I would question the design and business rationale. If a business process is well defined, you can design the UX and business logic to be more rigid around what changes are made and when. If you implement a design to support the business logic, then it should eliminate the need to provide a "reason" for every arbitrary change. Each operation should have a purpose and the design should account for all primary scenarios.
Business Process Flows, Business rules and workflows help you to enforce the business logic, and then the data/reporting will tell you the state of the record.
Please click Accept as Solution if my post answered your question. This will help others find solutions to similar questions. If you like my post and/or find it helpful, please consider giving it a Thumbs Up.
Keep up to date with current events and community announcements in the Power Apps community.
Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.
Check out the latest Community Blog from the community!