2 Replies Latest reply on Sep 19, 2014 8:59 AM by ArturoIacobelli

    Deleting a Record

    ArturoIacobelli

      Title

      Deleting a Record

      Post

      Hello,

      I have a record with a portal. Once a user enters the relevant information into the portal and presses main menu button, a script will run that deletes the record I am currently in, without deleting the portal, and goes back to main menu. The only problem I have is how do you delete a record without deleting the records in the portal in a script?

       

      Arturo

        • 1. Re: Deleting a Record
          philmodjunk

          As long as you do not select the "delete" option in the relationship between the Layout's Tutorial: What are Table Occurrences? and the portal's Table Occurrence in the underlying relationship, deleting the current record shown in the layout will not delete any records in any other tables. This is true for manually deleting records and when using Delete Record in a script. Just make sure that the focus is not on a row of your portal. Manually, click out side of the portal, In a script use commit records to remove the focus from any portal row.

          The exception to this is when the portal and the layout are both based on different occurrences of the same data source table. In such case deleting the layout's current records will also delete the same record from the portal's as these are actually the same record in the same table.

          • 2. Re: Deleting a Record
            ArturoIacobelli

            Thank you very much. It was just the option on the table relationship I had selected:).