Object : Order (ORDR)
Trigger Field : "Print Required" (PRINT_REQ)
Trigger Method : Submits batch order print job. Batch function
prints order and updates PRINT_REQ to 'N'.
Trigger Event(s) : 1. AFTER INSERT when PRINT_REQ EQ 'Y'
2. AFTER UPDATE when PRINT_REQ EQ 'Y'
and PRINT_REQ NEP PRINT_REQ
Invoked By : (i.e. How is an order submitted for printing ?)
CHANGE #PRINT_REQ 'Y'
UPDATE FIELD(#PRINT_REQ) IN_FILE(ORDR)
Comments : It may seem a little obscure as an IBM i
based trigger but what if the update
comes from a PC based application via
the LCOE facility, or from a batch job
that starts automatically every morning
and automatically selects certain
orders for printing ? |