A script-enabled browser is required for this page to function properly.

On-Delete Trigger

Description

Fires during the Post and Commit Transactions process and replaces the default Oracle Forms processing for handling deleted records during transaction posting. Specifically, it fires after the Pre-Delete trigger fires and before the Post-Delete trigger fires, replacing the actual database delete of a given row. The trigger fires once for each row that is marked for deletion from the database.

Definition Level form or block

Legal Commands

SELECT statements, DML statements (DELETE, INSERT, UPDATE), unrestricted Built-ins

Enter Query Mode no

Usage Notes

  • Use an On-Delete trigger to replace the default Oracle Forms processing for handling deleted records during transaction posting.
  • To perform the default Oracle Forms processing from this trigger, that is, to delete a record from your form or from the database, include a call to the DELETE_RECORD Built-in.
  • On Failure

    Oracle Forms rolls back to the most recent savepoint

    Fires In

    Post and Commit Transactions

    On-Delete Trigger Example

    This example updates the employee table to set the Termination_Date, rather than actually deleting the employee from the database.

    BEGIN
    UPDATE emp
    SET termination_date = SYSDATE
    WHERE empno = :Emp.Empno;
    IF form_fatal OR form_failure THEN
    raise form_trigger_failure;
    END IF;
    END;


    DELETE_RECORD Built-in