4D v18

entity.getStamp( )

Home

 
4D v18
entity.getStamp( )

entity.getStamp( )  


 

The entity.getStamp( ) method returns the current value of the stamp of the entity.

The internal stamp is automatically incremented by 4D each time the entity is saved. It manages concurrent user access and modifications to the same entities. For more information about this mechanism, please refer to the Entity locking page.

Note: For a new entity (never saved), the method returns 0. To know if an entity has just been created, it is recommended to use entity.isNew( ).

Example  

 C_OBJECT($entity)
 C_LONGINT($stamp)
 
 $entity:=ds.Employee.new()
 $entity.lastname:="Smith"
 $entity.save()
 $stamp:=$entity.getStamp() //$stamp=1
 
 $entity.lastname:="Wesson"
 $entity.save()
 $stamp:=$entity.getStamp() //$stamp=2



See also 

entity.save( )

 
PROPERTIES 

Product: 4D
Theme: ORDA - Entity

 
PAGE CONTENTS 
 
HISTORY 

 
ARTICLE USAGE

4D Language Reference ( 4D v18)