Database Reference
In-Depth Information
Figure 17-30. The finished Process Expenses script looks like this example. These comments are
different from the placeholder comments you created originally. Here blank comments group the
script steps into logical chunks so it's easier to see the reason for all the layout changes. If you
have to grab and set more data from the expense record later on, it'll be easy to see where to grab
the new data from and where it needs to be set. Work out your own system of commenting scripts
and then stick with it consistently.
Testing Scripts
To test your script, first go to a job record that has unbilled timeslips and expenses (or create
a new job record, plus new unbilled timeslips and expenses, if necessary). Once you're on
the job record, run the “Create Invoice for Job” script. To make your testing as much like the
conditions your users will see, create a button for running the script. In a flash, you should
see a new invoice, properly assigned to the customer and containing line items for each un-
billed item.
Search WWH ::




Custom Search