cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
dennisb88
Responsive Resident
Responsive Resident

Track changes in a dataverse records in a model driven app

Hi all,

 

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.

6 REPLIES 6
cchannon
Super User
Super User

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".

dennisb88
Responsive Resident
Responsive Resident

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.

ChrisPiasecki
Super User
Super User

Hi @dennisb88,

 

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.

dennisb88
Responsive Resident
Responsive Resident

Thank you guys!

 

I'm agree with Chris, but first of that I need to convince the customer.

 

Thanks again.

Do you think you can help me perform this?

 

Helpful resources

Announcements
Power Platform Call June 2022 768x460.png

Power Platform Community Call

Join us for the next call on August 17, 2022 at 8am PDT.

Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

Users online (4,928)