This
This function gives access to the class instance pointer when executing a method on a class or a property of a class.
This.PROPERTY
To access a method of the current instance named "METHOD" with 'I','J' as arguments:This.METHOD(I,J)
# Label called on the operation on a field named VAT defined in sales order line (on an update operation)# This is the SORDERLINE instance (instance is LINE(2))# SORDERLINE is usually a child class of SORDER (instance is MYORDER)$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# Let's be sure the class is used as a child classIf This.APARENT<>null# Is the parent class really SORDER?If This.APARENT.Objecttype="SORDER"# Access to a property in the SORDER class by using APARENT instance (a default VAT rule)If This.VAT<>This.APARENT.DEFAULT_VAT# Check consistency between VAT and header VAT (function)ERROR=Func(This.VAT,This.APARENT.DEFAULT_VAT)...EndifEndifEndifEndifReturn
Instance, snapshot, FreeInstance, FreeGroup, NewInstance, Sage X3 Script Glossary Snapshot