getPreviousVersion()

Overview

public any function getPreviousVersion(
      required string  objectName    
    , required string  id            
    , required numeric currentVersion
)

Returns the version number of the previous version of the given record ID and existing version

Arguments

NameTypeRequiredDescription
objectNamestringYesName of the object whose record we wish to retrieve the version history for
idstringYesID of the record whose history we wish to view
currentVersionnumericYesCurrent version number