This is the legacy 4D documentation web site. Documentations are progressively being moved to developer.4d.com

Home

 
4D v19.8
entity.getStamp( )

entity.getStamp( ) 


 

entity.getStamp () -> Result 
Parameter Type   Description
Result  Number in Stamp of the entity (0 if entity has just been created)

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 

Created: 4D v17

 
ARTICLE USAGE

4D Language Reference ( 4D v19)
4D Language Reference ( 4D v19.1)
4D Language Reference ( 4D v19.4)
4D Language Reference ( 4D v19.5)
4D Language Reference ( 4D v19.6)
4D Language Reference ( 4D v19.7)
4D Language Reference ( 4D v19.8)