4 Replies Latest reply on Feb 2, 2013 9:19 AM by mcrostie

    Locking a record in list view

    mcrostie

      Hi all

       

      I have a layout with a header, body and footer. The body can display many lines of records in a list view. My question is

       

      How can I make the records not scroll to the top or bottom of the body section after running a script?

       

      Thanks in advance

       

      Regards

       

      Michael

      FM12A

        • 1. Re: Locking a record in list view
          Mike_Mitchell

          Michael -

           

          The position of the screen will adjust itself to make sure it can display whatever record is the current record. So if you want to keep a particular record in view, you can save its record ID in a variable, then use the Go to Record / Request / Page script step to move back to that record when your script is complete.

           

          Note that this may still cause some movement in the screen, since the screen will move only enough to accommodate displaying that record. So, for example, if that record happened to be the first one on screen and your script goes to the last record, it may not be the first record on screen when it returns.

           

          To alleviate the problem completely, consider opening a second window, running your script there, then closing the second window and returning to the first. In this way, the position of the records will be undisturbed.

           

          HTH

           

          Mike

          • 2. Re: Locking a record in list view
            mcrostie

            Hi Mike

             

            Thanks for your input.

             

            I have just tried opening the second window and running the script (which is a on object modify) and I get an error 301

             

            I will think about this further

             

            Regards

             

            Michael

            • 3. Re: Locking a record in list view
              Mike_Mitchell

              301 indicates the record is in use in the first window. You'll have to use a Commit Record / Request script step prior to opening the second window to prevent it.

              • 4. Re: Locking a record in list view
                mcrostie

                Thanks Mike

                 

                Magic again

                 

                Problem Solved

                 

                Regards

                 

                Michael