2 Replies Latest reply on Aug 22, 2011 10:18 AM by Matty_1

    PerformScript in an If function.

    Matty_1

      Title

      PerformScript in an If function.

      Post

      Hello Phil, Here is the script I am referring to.  Thank you!  I've also Copy pasted my post from the other message for your reference.

       

       

      Correct, but the above script is called upon via "Perform Script" and is only the first step to several calculations in the parents script called "ClientInvoicing".  What I'm trying to do is setup a button which will verify which is the prefered method for for receiving invoices.  If it's e-mail it will draft and e-mail and attach a PDF, if it's fax it will save the pdf out and prompt the fax program installed.

      I think I confused you little bit because I'm no longer referring to the contract number issue I was having but more so the Get(ScriptParameter) only.  As you can imagine I have a fairly complex script that checks and executes the proper function according to the prefered receiving method but before doing all that I want to button to do nothing but display a custom dialog if the ticket is closed.  In order to do that (I can only imagine) I will need an If function at the top of the script.  The problem is the exit script function I have in my previous post works of course but exits back to the parents script that launched the "ClosedTicketCheck" script.  I would like to exit everything if the "Sales_Contract::Record_status" field is equal to "Close".

       

      My ultimate goal is not to have a single hardcoded script.  Thought this could be a good one to start on because it's complex.

       

      Please find attached my coding (just figured out I could save it out as a PDF!)  At the top you will see the perform script line that I would like in an if function.  You will also see all sort of hard coded and not so hardcoded lines through out the script.  Eventually I want them all gone.

      ClientInvoice.jpg

        • 1. Re: PerformScript in an If function.
          philmodjunk

          My ultimate goal is not to have a single hardcoded script.  Thought this could be a good one to start on because it's complex.

          Good luck with that. While it is possible with some scripts it often is not possible to do this due to limitations to what you can indirectly reference. I have a nice delete portal row script that I routinely import into each new file as it has no hardcoded steps and all is controlled via a list of parameters passed to the script. You can download my known bugs list database to see a copy and to import it into your own files if you wish.

          On the other hand, I just spent several hours this weekend attempting to put together another such "utility script" and kept banging my head on steps that could not be anything but "hard coded". I plan to put a feedback post up in the near future on my experiences with that.

          See my response to your other thread on using Halt script instead of exit.

          • 2. Re: PerformScript in an If function.
            Matty_1

            Great, thank you!