latestEdition

latestEdition(): Integer;

The latestEdition method of the Object class returns the most‑recently committed edition of the receiver as an integer value. For example, if you are using edition 4 of an object and the object has been updated twice by other users or methods so that it now has an edition of 6, edition 6 is the edition that is returned with the latestEdition method.

If the receiver of the latestEdition method is being updated by the same process, the updated edition is returned. Other processes will instead have the most‑recently committed edition returned.

Example of the Use of the latestEdition Method

When the CustomerMaint form for a customer is opened on a client node, the logic populates the data in the form controls as required and then stores the current edition of the object for further reference so that the object is not locked the entire time the client node has the CustomerMaint form open.

When the user clicks the update button, the logic can then compare the latest edition on the server against the edition stored when the form was opened. If it does not match the edition at the time the CustomerMaint form was populated, it can warn the user or take the appropriate action specified for the application.