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

    Resume Script


      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

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


          Select "single step"


          The single step is "resume script"



          Chris Cain


          • 2. Re: Resume Script

            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.





            • 3. Re: Resume Script

              +1. Two scripts.


              -- sent from myPhone --

              Beverly Voth


              • 4. Re: Resume Script

                beverly wrote:

                Two scripts.


                One script, two parameter-driven blocks of functionality.

                • 5. Re: Resume Script

                  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

                    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

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

                      • 8. Re: Resume Script

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

                        • 9. Re: Resume Script

                          Thanks for the info. What is 2FA

                          • 10. Re: Resume Script

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

                            • 11. Re: Resume Script


                              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

                                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

                                  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

                                    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.



                                    1 2 Previous Next