AVANT_BOUTON

Description

This action is called before executing a button at the bottom of the screen.

Template

Window entry

Use

    For instance, it is possible to check the access rights to this button, or to limit the possibilities in case of tunnel to an OBJect with GCONSULT.

GCONSULT = 0  access without limitations.
GCONSULT = 1 access to all the records being read.
GCONSULT = 2 access to the current record being read.

    the execution of the button is prohibited via FOK=0 (no execution of the dictionary action or BUTTON action)

    a message is displayed by assigning some text to the GMESSAGE variable and selecting the type of message with GERR =1,2 or 3.
Warning!
Based on the value of GERR, the button will be executed or not, irrespective of the value of the FOK variable. 
    GERR=1    no button execution
    GERR=2    button execution
    GERR=3    button execution if button response OK.

In other words, if the button should be prohibited and an information message sent: FOK should be set to =0, but not GERR=2 that will be replaced by Call MESSAGE ( message ) From GESECRAN. 

    After triggering and executing these OK, END and ABORT buttons, the supervisor closes the entry window. Conversely it is possible to specify that the user should stay in this window by setting FIN=0 (used namely when setting FOK=0 on one of the three buttons).