Hello,
I have a table, and every time I update one of it's fields, I want an audit trail old & new record with action type (Create, update, Delete).
I want to make an own logic in my app ( without using forge components)
I searched the forums and found this solution but I didn't understand exactly what I have to do after creating the entity, can someone explain a bit more or share oml please?
Thanks
Hi Mohamed,
If you want to capture the changes a database record has throughout time, you're going to need to save these changes. The solution you are mentioning suggests that whenever you update a record (e.g. a Patient name), you also create a record in the audit table.
Imagine a scenario where you have an entity Patient, and you have a record with the name John, but actually his name should be changed to Richard. According to this solution, you should:
In this way, you will be able to go back to the audit trail and know who changed what and when, which is the purpose of the trail.
Kind Regards,João