2 Replies Latest reply on Mar 16, 2012 5:03 PM by smoothie

    Delete Related Record without dialog in a Portal deletes the Master instead of the related record!

    smoothie

      Summary

      Delete Related Record without dialog in a Portal deletes the Master instead of the related record!

      Product

      FileMaker Pro

      Version

      11 Pro

      Operating system version

      Windows 7 64 bit Professional

      Description of the issue

      I have a portal with a one to many related table.

      The current Layout references Table A
      Portal is setup for Table B as the related table with fields from  both Table B and a second instance of Table A 2 in the portal.  (a many to many relationship).  If you perform a Delete Record/Request via a button script on the portal row and check "Perform without dialog", it deletes the master record from Table A 2 instead of the related record in Table B.

      Steps to reproduce the problem

      As above.

      Expected result

      Since the portal is set to pull records from table B, deleting without a dialog should delete the related record from table B.

      Actual result

      Master Record from Table A 2 is deleted.

      Workaround

      Uncheck the "Perform without dialog" checkbox on the Delete Record/Request dialog and it asks which record to delete - the master record or the related record. (With an extra message box, which is an additional waste of time...)  In this messagebox, the  master record is the default, when the related record should be the default, since that is the table the portal is set to pull data from.  The related instance of the master table should not be the default if you tell it to delete without the dialog.  This setup of the dialog leads to the erroneous deletion of the master record when you select the perform without dialog checkbox in your code.  Swap them and that will fix the bug.