3 Replies Latest reply on Mar 6, 2009 12:45 PM by CarrieB.

    Arg! Trouble with record deletion ..... Please help

    CarrieB.

      Title

      Arg! Trouble with record deletion ..... Please help

      Post

      Where to start? Let' see, I have a button which causes a user to enter a new layout in a related table and create a new record, setting certain fields, etc. Then I have a cancel button, which runs a script that deletes the record request (in the related table) and goes back to the original layout. This button work fine, unless the user sets a field with a drop down menu, then chooses Cancel. This time the script deletes the original contact record instead of the related record. And, I just can't seem to figure out why.

       

      Any help would be much appreciated. Thank you!!!

        • 1. Re: Arg! Trouble with record deletion ..... Please help
          ninja
            

          howdy carrieB.

           

          two questions:

           

          1. do you have the relationship set up to delete records in the related table when records are deleted in this one?  That could be why it's deleting the original contact record...you switched tables when you switched layouts, changing your frame of reference...now you can delete back to your main contact table...?

           

          2. I've run into some quirks when initiating scripts if a field is "active" (ie. cursor is in it) when said field is from another table.  Is your dropdown field from a related table?  If so, add "Commit record" as the first step in your script and see if that makes the difference.

           

          let us know how you progress!

          • 2. Re: Arg! Trouble with record deletion ..... Please help
            CarrieB.
              

            I already checked to make sure the relationship did not allow deletion that direction. And, it doesn't. I am aware of the frame of reference between the tables. But, for some reason, it is like it jumps back to the original table if you set certain fields in the related table. I will try the commit record and see if that helps.

             

            Thank you!!!!!

            • 3. Re: Arg! Trouble with record deletion ..... Please help
              CarrieB.
                 The commit record worked. Yay! Thank you!