2 Replies Latest reply on Nov 26, 2014 12:07 PM by BernieWire

    Script forcing the user to execute another before executing the originally intended one

    BernieWire

      Title

      Script forcing the user to execute another before executing the originally intended one

      Post

      Hi everyone. I am currently stumbling over some roockie (well I am one though) problems with a script.

      I have created an email script to attach and send invoices. On the invoice layout I have one script assigned to a tutton, where the user can commit the invoiced items to/from the inventory.

      I would like to assign a script step to the "Email_Invoice" script which forces the user to commit the items to/from the inventory before he is able to send the Invoice by email. 

      Anyone any idea on the adequate script step? Tnx in advance for all help.

        • 1. Re: Script forcing the user to execute another before executing the originally intended one
          bj9545dunn

          I am not sure what your work flow is here.  Would someone 'commit' the invoice and then send the email with the Invoice attached or would someone look up a particular invoice and then decide to email it?   Many times you can control user actions by controlling the interface.

          Much like controlling the display of information, you can control the display and use of buttons.  If you 'hide' the email button until your invoice commitment is fulfilled, the user will not be able to click on the button.  So you can use the Hide object when feature on the button that calls the email script.  When the invoice is committed, set the condition that allows the button to be un-hidden.

          If they are to commit the invoice and then send the email, in your script that commits the invoiced items, once the items are committed, you could use Show Custom Dialog script step. Set one button to Cancel and one to Send Email.   Use Get(LastMessageChoice) function to test which button they click on the custom dialog.  If they select Send Email either call that script or include the script steps in the commit records script.

           

           

          • 2. Re: Script forcing the user to execute another before executing the originally intended one
            BernieWire

            Tnx a lot for your help. The hide object when option is working fine.