hi ,
i am using forms 6i ,
there are some cases when i want same thing happen whenever the user inserts or updates a record in a block , so i write the same code in pre-insert and pre-update triggers ,
is there an alternative trigger i should write my code into it ? like the db trigger " before insert or update on table "
as an example ,
i have a form for sales invoices , and there is a list item for " Payment Methods " (Cash and Deferred Payments ) ( 1 and 2 respectively ) , and there is a text-item "Deferred Payments Number" (DPN) for short , which is hidden when i open the form at first time ,
if the user chooses 2 from the pop-list , it shows the (DPN) item and assigns 1 to it , if he chooses 1 (cash) , and try to save the form , then the DPN should be null ,
so i have to write this once in the pre-insert , and again in the pre-update :
if :payment_method = 1
then
:DPN := NULL ;
end if ;
that's why i am searching for alternative trigger , even because this scenario could exist with more than one block , then i should write in each block's pre-insert and pre-update triggers the same code .
thanks in advance