To see field triggers, let us look at our Table 50000 Radio Show. Open the table in the Design mode. Highlight the No. field, press F9, and you will see the following:
Each field has two triggers, the OnValidate() trigger and the OnLookup() trigger, which function as follows:
- OnValidate(): The C/AL code in this trigger is executed whenever an entry is made by the user. The intended use is to validate that the entry conforms to the design parameters for the field. It can also be executed under program control through the use of the VALIDATE function (which we will discuss later).
- OnLookup(): Lookup behavior can be triggered ...