AnsweredAssumed Answered

PerformScript in an If function.

Question asked by Matty_1 on Aug 22, 2011
Latest reply on Aug 22, 2011 by 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

Outcomes