Regarding Comparing two Objects and what attributes changed

0
when we editing an existing object how to get old values and new values for display? ex:employee entity old value                                                                                                          Change value Name:Shabana                                                                                                Name:Shabana ID:11                                                                                                                  ID:11 Email:shab@yahoo.com                                                                                Email:shabana@yahoo.com   History Updated: Email: old value-shab@yahoo.com   new value-shabana@yahoo.com
asked
3 answers
3

After doing your edits (and before committing them) you can retrieve the DB version of the object and compare the cached version to the db version. This can (for example) be done in the before commit event of your entity.

answered
2

If you want a ready-to-implement solution take a look at the Audittrail module in the marketplace. It can compare and log changed attributes for you.

answered
0

Hi Shabana,

As suggested by Andreas, when you change the attributes, you can again retrieve the data using microflow. Compare the already committed object with newly retrieved object. Then display the object which you want.

After the retrieval only, commit the changed object.

Thank you

answered