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,
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.