FRM-40508 in Master block from raise form_trigger_failure on detail block?
murph2mApr 11 2012 — edited Apr 12 2012Hi All,
I have an Orders block and a Bookings block - they are both base table and there is a master detail relationship based on an id. All standard stuff so far. I have a check that does a raise form_trigger_failure if an item is incorrectly filled in on the bookings block. If I come into the form create an order and some bookings at the same time but incorrectly fill in a booking record item and then hit save (commit_form) then the orders block gets filled in with the appropriate id and then the form_trigger_failure occurs on the appropriate booking record. I then correct this and click save again and I get FRM-40508 and displaying the error shows me it is trying to insert into the orders block again and cannot - see below for result from display error:
INSERT INTO ORDERS) VALUES )
ORA-00001: unique constraint (ORDS_PK) violated
What could cause this to happen? Default forms behaviour should just handle this scenario is my understanding.
What I hope is not related is that the bookings block is actually based on a view and that the insert and update for it are handled within the on-insert and on-update triggers on the bookings block. This all seems to work ok though.
Many Thanks
Matt