2 Replies Latest reply on Dec 30, 2015 7:47 AM by MikeWile

    Perform script on server question

    MikeWile

      I have a solution that runs a script when the solution opens and when it closes.

       

      I added a script that runs on the server. It opens a layout and adds a record. Everything works as it should.

       

      When I looked at the server log, i noticed some scripting errors: Show custom dialog, Adjust Window, close file errors.

       

      These are not in the PSOS but they are in the opening and closing scripts of the solution.

       

      My question is, when you run a PSOS that goes to a layout, does the server load the onOpen and onClose script of the solution? If not, why does it generate an error. If I write the script to run from client machine, no scripting error shows up in the log. I check to make sure the layout that is accessed doesn't have any script triggers.

        • 1. Re: Perform script on server question
          siplus

          MikeWile wrote:

           

           

          My question is, when you run a PSOS that goes to a layout, does the server load the onOpen and onClose script of the solution? If not, why does it generate an error. If I write the script to run from client machine, no scripting error shows up in the log. I check to make sure the layout that is accessed doesn't have any script triggers.

           

           

          Yes.

           

          You should shield away your opening and closing scripts from being run when on server (if it makes sense to).

           

          Begin them with a IF

           

          Patterncount( Get(ApplicationVersion) ; "Server") and exit script on true.

          • 2. Re: Perform script on server question
            MikeWile

            Thanks for the info. I never would have suspected it was running those scripts if it wasn't for the log. Just went through all the scripts and added the IF statement. Runs without generating a script error now. THANKS.