function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
okaylah52okaylah52 

Function for getting a list of changes between two objects (old and new)

Is there a built-in generic function to find a list of changes/differences between two objects of same type, e.g. opportunity?

 

For example: in updating an opportunity, in my trigger, i want to detect get a list of which fields have been changed. I wrote a function to detect any change by comparing all fields in an opportunity old against new.

 

Thanks.