1 Reply Latest reply on Jul 14, 2013 6:20 PM by Andreas Weiden

    How to update or delete records in a Complex View in Forms?

    1007980

      Hi,

      I have a requirement to create a Form by using Complex View. Insertion is possible but updation and deletion is not working properly . I got FRM-40501 Error. I need How to update or delete records in a Complex View in Forms?

       

       

      --

      Thanks & Regards,

      Hari Babu

        • 1. Re: How to update or delete records in a Complex View in Forms?
          Andreas Weiden

          Depending on how complex your view is, forms is not able to determine how to appropiately lock a record, when you try to update or delete a record.

           

          One approach to using complex views in forms:

          1. Set the Key-mode of the block to "Non-Updateable"

          2. Mark the column which can be used to build the WHERE-condition to uniquely identify a record with "Primary Key" = "Yes"

          3. For doing INSERT, UPDATE and DELETE, create an INSTEAD-OF-trigger on the view.

          4. Create your own ON-LOCK-trigger in forms which does the locking of the records to update.