1 2 Previous Next 15 Replies Latest reply on Apr 7, 2016 5:19 PM by beverly

    Resume Script

    Steven_FL

      I want to create a button on the layout that resumes a script. The script is pause with the script step "Pause/Resume Script Indefinitely"

      Ho do I do that?

        • 1. Re: Resume Script
          Extensitech

          Right-click your resume button, select "Button Setup"

           

          Select "single step"

           

          The single step is "resume script"

           

          HTH

          Chris Cain

          Extensitech

          • 2. Re: Resume Script
            Mike_Mitchell

            It's generally a bad practice to leave a script in a paused state. It opens up all kinds of security and operational issues. As an example, an external file can issue a Halt Script command even if you haven't allowed user abort, leaving the system in an indeterminate state and possibly giving the user access to things he shouldn't have.

             

            It's generally better to split your script into two parts (start and finish, or before and after, or whatever) and let the button activate the second part.

             

            HTH

             

            Mike

            • 3. Re: Resume Script
              beverly

              +1. Two scripts.

               

              -- sent from myPhone --

              Beverly Voth

              --

              • 4. Re: Resume Script
                erolst

                beverly wrote:

                Two scripts.

                 

                One script, two parameter-driven blocks of functionality.

                • 5. Re: Resume Script
                  Steven_FL

                  Dear Mike,

                  I see your point but don't agree. If I make a window that is Float and he can not abort or do anything else just hast to finish the script. Do you still consider it bad practice? and if yes why?

                  • 6. Re: Resume Script
                    Mike_Mitchell

                    I've already explained why.

                     

                    Steven_FL wrote:

                    If I make a window that is Float and he can not abort or do anything else just hast to finish the script.

                     

                    This statement is not true. You may think you have it locked down, but an external file can still call a Halt Script command and trap your user. Steven Blackwell demonstrated this security vulnerability at the last DevCon.

                     

                    In addition, unless you provide an escape hatch, locking it down like this will only encourage the user to use a three-finger fix (Ctrl-Alt-Del) if he doesn't want to do what you want him to.

                     

                    The generally accepted practice is not to rely on a paused script for workflow or security control.

                    • 7. Re: Resume Script
                      Steven_FL

                      Oh, wow. Thanks for the input. That is very interesting thanks for the data. Now I full understand.

                      • 8. Re: Resume Script
                        Vaughan

                        Halt is the script step of the Devil. Not even 2FA will save it.

                        • 9. Re: Resume Script
                          Steven_FL

                          Thanks for the info. What is 2FA

                          • 10. Re: Resume Script
                            Vaughan

                            Two Factor Authentication -- a (very cheeky) reference to another discussion on the forums.

                            • 11. Re: Resume Script
                              Steven_FL

                              Understand.

                              So lets say your are on a record i.e. invoice and the user has to see the customer record.

                              So I would make a script that goes to that record he can review the record (with script pause) and then hit enter and back he is.

                              Would you say that is also a bad usage?

                              • 12. Re: Resume Script
                                Mike_Mitchell

                                Almost any use of Pause is a bad idea. For the above mentioned reasons.

                                 

                                In the use case you mention, what would be wrong with a separate window or popover, using OnLayoutKeystroke to dismiss it?

                                • 13. Re: Resume Script
                                  Vaughan

                                  Whether scripts are paused (or not) is an implementation detail. What you need to determine is what you want the interface to be, and that depends somewhat on the work flow.

                                   

                                  I would probably have made the invoice open in a new window. Alternatives are something like a tabbed-interface where returning to the "customers" tab will display whatever record and view there was when the user left it.

                                   

                                  With the paused-script method, how can the user compare two invoices with each other?

                                  • 14. Re: Resume Script
                                    Steven_FL

                                    Dear all,

                                     

                                    Thanks a lot for all you input. I'm getting the point and I really appreciate that you take the time and helped me.

                                     

                                    Thanks and have a great rest of the week.

                                     

                                    Steven

                                    1 2 Previous Next