Skip to Main Content

Oracle Forms

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Oracle Forms trigger alternative for "before insert or update on table" db trigger .

Eslam_ElbyalyFeb 27 2016 — edited Feb 29 2016

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

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 28 2016
Added on Feb 27 2016
9 comments
2,927 views