VERROU

Description

This action is called when a current record has been successfully locked during modification. The corresponding value of the key is stored in the grid CLESEC, the variable SYMBOLE containing the locked symbol (it is the abbreviation of the table followed by the current key in the case of single or combined management and from the name of the table in grid management).

OBJect type

Simple, Grid, Combined

Transaction

No

Use

When considering that a specific condition must prevent the locking, it is necessary to unlock the symbol, with the help of the instruction Unlock =SYMBOLE and to assign the variable OK to the value 0.

Example : SUBBIC   Entry of the customer BP invoices

In the entry of BP invoices, the table to be locked is not the principal table of the OBJect, but the table GACCENTRY [HAE].

$VERROU
[L]SYMBHAE = "HAE"+[F:SIH]NUM+"\"+[F:SIH]GTE
Lock =SYMBHAE With lockwait=0
If fstat
Unlock =SYMBOLE
[L]OK=0
Endif
Return

$DEVERROU
Unlock =SYMBHAE
Return