4 Replies Latest reply on Nov 9, 2012 7:27 AM by philmodjunk

    Delete Portal Line - Deletes other fields??

    melshamamyan

      Title

      Delete Portal Line - Deletes other fields??

      Post

           When you delete the first line of a portal record on a record, it not only deletes the first line but also delets other fields on the record. This only happens when you delete the first field of the portal.

           If we have 6 lines on the portal and I delete the first line, it also deletes data from other fields on the record. If you delete any other line on the portal EXCEPT the first line everything works fine. The delete is a script which deletes the line on the portal. Please take a look at the screen shot attached.

           It deletes the fiels I have circled in the screenshot.

           Any Ideas?

            

      Portal_Row_Delete.JPG

        • 1. Re: Delete Portal Line - Deletes other fields??
          philmodjunk

               Note that all the fields that you circled come from a related table. I can tell by the fact that they all start with :: in your screen shot. Chances are, these fields either refer to the same related record as the first record in your portal or from a record that is linked to that first portal record. In either case, when you add fields from a related table directly to your layout instead of inside a portal, they display data from the first related record--which can correspond with that first record in the portal. Deleting another record from the portal won't have any visible effect because your fields that you circled don't display data from any of them, only the first related record.

          • 2. Re: Delete Portal Line - Deletes other fields??
            melshamamyan

                 So what you are saying is that I have to change all of those fields from the same table on either the portal or the bottom fields? Why can't it only delete the lines on the portal?

                 I understand what you are saying, but can I develop a script that ONLY deletes the line that the user wants?

            • 3. Re: Delete Portal Line - Deletes other fields??
              Sorbsbuster

                   "can I develop a script that ONLY deletes the line that the user wants?" - your script does exactly that.  It is only deleting the related record shown on the portal row they clicked on.

                   The fields in the portal show the data from the related table.  When you delete the row the related record and its data will disappear.

                   The fields you have circled, as Phil has pointed out, are also from a related table.  Therefore if you delete the record they are being picked up from you will also delete them.  If you do not delete their related record they will continue to show.  The record they will show will usually be (because portal filtering or sorting can change that) the same record as that shown in the first portal row.

                   I can't see any value in you showing the data inside the circle (but I don't know what it is meant to be doing).  Maybe a solution could be suggested if you explanined to us the purpose on this layout of the circled fields.

              • 4. Re: Delete Portal Line - Deletes other fields??
                philmodjunk

                     And it is possible that the data shown is not from the portal's table, but from a table related to the portal's. In which case, your data may still be there, but your relationship structure is such that deleting the first portal record removes the needed link to that record.

                     I suggest that you describe your table(s) and the relationships that link them.