BEFORE DIALOG block

The BEFORE DIALOG block is executed one time as the first trigger when the DIALOG instruction is starts, before the runtime system gives control to the user. You can implement variable initialization and dialog configuration in this block.

In this example, the BEFORE DIALOG block performs some dialog setup and gives the focus to a specific field:

   BEFORE DIALOG
     CALL DIALOG.setActionActive("save",FALSE)
     CALL DIALOG.setFieldActive("cust_status", is_admin())
     IF cust_is_new() THEN
        NEXT FIELD cust_name
     END IF

A DIALOG instruction can include no more than one BEFORE DIALOG control block.