90 likes | 114 Views
This lesson provides an overview of triggers and their categories. Learn how to plan and define triggers in a form, and understand the properties that impact trigger behavior. Explore trigger types and scope, including form, block, and item levels.
E N D
Objectives After completing this lesson, you should be able to do the following: • Define triggers • Identify the different trigger categories • Plan the type and scope of triggers in a form • Describe the properties that affect the behavior of a trigger
Form Builder Triggers PL/SQL Queries Validation Navigation Interaction Internal event Errors/Messages Others Event Fire PL/SQL PL/SQL Trigger types
Trigger Scope Component Levels • Form • Block • Item Type Scope Code
Event Event Event Trigger Scope
Trigger Type Component • Pre- • Post- • When- • On- • Key- Type Scope Code
Trigger Code Component • Statements • PL/SQL • User subprograms • Built-in subprograms Type Scope Code
4 Event Event Execution Hierarchy Formlevel On-Message On-Error 1 EH = Before Blocklevel On-Message On-Error 2 EH = After EH = Override On-Message Itemlevel 3 EH = After
Summary • Trigger: Event-activated program units • Type: Defines the event that fires it • Prefixes: • Key- • On- • Pre- • Post- • When- • Code: PL/SQL anonymous block • Scope: Form, block, or item level