Snapshot

This built-in method gives access to the Snapshot image of an instance.

Syntax

To access a property named "PROPERTY" in the snapshot:
This.snapshot.PROPERTY

Example

# This program will check if a property has been modified in a class and in its parent class# The main class is called SORDER, and includes a reference to LINE child classes.# Here the code has been called on the line (This is a LINE instance)$CONTROL_VAT# Access to a property of the instance (VAT) and another instance (snapshot) having the same propertiesIf This.VAT<>This.snapshot.VAT : # The VAT value is no more the VAT value when data was read for update# Access to a property in the SORDER class by using APARENT instance (a default VAT rule)If This.VAT<>This.APARENT.DEFAULT_VAT# Was also the DEFAULT_VAT property modified ?If This.APARENT.DEFAULT_VAT<>This.APARENT.snapshot.DEFAULT_VAT# Here we are in the case where LINE.VAT was modified and DEFAULT.VAT also and they are differentEndif...EndifEndifReturn

See also

RevertToSnapshot, SnapshotEnabled, getModified, modified