I am trying to display Old values and New values of a record whenever certain fields are edited on a record. How do we achieve this.
Edit: I am getting the Oldmap and newmap from the trigger context and comparing the old and new to check if the fields are changed and add them to a list.
The point where I was stuck is if there is a reference field like lookup to a different object we wouldn't get the values we can only get the Id of the record which is not very useful and this would mean more queries.
Can you point me in right direction