DROIT

Description

This action is called after the read of the record in the principal table, before the loading of the screens by the [F] class for the principal table.

OBJect type

Simple, Grid, Combined

Transaction

No

Use

This action cab be used to verify the access rights to the record. When the access rights are not verified, the supervisor is warned by setting the variable CLECUR = 0. In addition, it is possible to display a message using the variable GMESSAGE.

Example :  SUBGAS  Entry of the accounting documents

Requirement to control the access rights to the journal in which the document is registered.

$DROIT
Call LECTURE("JOU",[F:HAE]JOU,"") From CONTOBJ
If [F:JOU]ACS<>""
   Call CONSACC([F:JOU]ACS,OK) From CPTSUB
   If !OK
   GMESSAGE = [F:HAE]JOU-mess(77,106,1) : # Journal not authorised
   GERR = 1 : CLECUR = 0
   Endif
Endif
Return