2 Replies Latest reply: Jan 21, 2013 4:09 AM by XeM RSS

    FRM-40654 Record has been updated by another user re-query error on delete

    XeM
      Hi All,

      I am workin on Forms 10.2 and Database 11g.

      On one of my forms i have two blocks master and detail, Now when i delete a record on detail block then in key-delrec i am changing some fields on master block this way both blocks are changed. The problem is first i was updating these fields on master block by on-delete trigger on detail block. Then i was getting FRM-40654 Error i googled and found that it is caused by lock i removed on-delete trigger.
      Then i used key-delrec trigger on detail block, now if user delete a record on detail block the required changes are made on master block everything runs smoothly

      And when i press save button following message is appeared on the status bar

      transaction complete (..) Records applied and saved
      It means that record is deleted successfully BUT when i re-query, record is still there not deleted

      Any one could solve..

      Edited by: 974222 on Jan 21, 2013 12:39 AM
        • 1. Re: FRM-40654 Record has been updated by another user re-query error on delete
          yoonas
          Hi,

          Did you check when user deletes a record on detail block the record is getting removed from the screen ?

          May be "transaction complete (..) Records applied and saved" is coming becuase of your master field modification that you do on key-delrec trigger

          Hope you did not forget to add the delete_record builtin in the key-delrec trigger

          Regards
          Yoonas
          • 2. Re: FRM-40654 Record has been updated by another user re-query error on delete
            XeM
            Thank you Yoonus,

            I fixed it. The problem was in on-delete trigger on detail block.

            On-delete trigger on detail block had some code which was updating master block. which was the root cause of error.

            I commented that code in on-delete trigger and above all code put null;

            managed changes from key-delrec trigger.

            Note that on-delete trigger on detail block was set to null which was preventing records from deletion although record was removed from screen and success message was displayed even then records were there in database and on query could be loaded to form.