Entity- and Occurrence-Level Processing
Entity-level processing affects the current entity and is usually occurrence-based. Much of this processing is initiated at a higher level in the component, or indirectly by a sequence of events.
Many events on higher levels cascade the processing to the entity level, such as storing data or reading data from the database. This is normal, but you cannot (or should not) reverse this process and attempt to influence higher-level processing from the entity level.
Occurrence-Level Processing
An entity in a runtime component is actually a collection of occurrences, so most entity-level processing is occurrence-level processing. For example, a retrieve statement activates the entity-level read trigger, but the processing is occurrence-based, as each occurrences is fetched from the database..
Processing that is logically connected to the entity as a whole, that is, to the collection and not to specific occurrences, can be defined in the Collection Operations code container, and detail and error triggers. In form components, the help and menu triggers also operate on the entity as a whole. These triggers do not work at occurrence level, instead they allow you to define default processing for the whole entity.
All other entity-level triggers are actually occurrence triggers. The ProcScript in these triggers should be aimed at each occurrence that is present in the component, or at the occurrence that currently has focus (depending on the trigger and circumstances).
For example, in form components, the getFocus trigger is only relevant for one occurrence at a time (the one that is gets the focus). The user can cause the getFocus trigger to be activated by placing the cursor in a field, which is always in an occurrence.