🚀 Welcome to MDriven Learn –  Don’t miss the latest Release Notes.
OCLOperators changePoints

See: Versioned_on_class


changePoints is used when Versioning is enabled on the class.

It retrieves the historical versions of an object based on a timestamp range.

MDriven records a “change point” every time a versioned object is modified. The changePoints(start, stop) operator returns all stored versions between the timestamps.

Syntax

self.changePoints(startTime, stopTime)
  • startTime – integer timestamp (UTC ticks) where the search begins
  • stopTime – integer timestamp where the search ends
  • Use -1 for stopTime to mean “until the end of recorded history”

Example

Customer.allInstances->first.changePoints(0, -1)

This returns every recorded version of the first Customer from the beginning of time to the latest version.