Open File ["INVOICES_PRODUCT_081611"]
can be left out of your script. I does no harm, but the Go To Related Records step will open the file for you so you don't actually need this step.
Pass the customer ID from file 1 to file 2 in a script paremeter you specify in the perform script step.
Then the File 2 script can be:
Go to Layout ["WORK ORDERS" (Invoices)]
Set Field [Invoices::CustomerID ; Get ( ScriptParameter ) ]
Note: this post assumes that you are using FileMaker 7.0 or newer.
Just to clarify, when you say...
"Pass the customer ID from file 1 to file 2 in a script paremeter you specify in the perform script step."
...would this be done using an Evaluate or Let function?
I'm pretty new at FM scripting, so if you could expand on this that would be great.
You could, but there's no need to do so if all you need to do is pass a number from the table in File 1 to the new record in File 2. You can simply enter the name of the table and field in the script parameter box by clicking the Edit button next to the options script parameter box, then selecting the field by double clicking it in the list of fields at the top left of the Specify calculation dialog that appears.
Using Let and evaluate is one method for passing multiple values inside a single parameter by passing a let function as text and then using evaluate on it in the second file's script to initialize the variables listed in it, but since you describe needing to pass only the single value, you don't need to do that here.
Amazing. Worked out perfectly.