The best way to do this is create a variable in the script which builds the path including the file name you want then use the variable name in the save record as PDF.
Take a look at a previous post Generating file names when creating PDF's Below is what I said there.
When specifiying the file path the back slash \ has to be replaced with a forward slash /
if you look at the specify output file part of the script step it shows examples of how the file path should look. remember to include the header part ie filewin:// in your calculated path.
In senriz's example he generates a local variable to hold the file path called $fileName (the $ is critical as it identifies it as a local variable in the script) he then concatenates (links together into one long string) using the & command
"file:" relative path identifier
Get(DesktopPath) returns the directory path for the desktop folder
JobTable::Job_Number your field which holds the jobnumber
"specs.pdf" the final part of the filename you want.
if the job number was 12345
the variable would hold something like file:/C:/Documents and Settings/manning/Desktop/12345specs.pdf
Get(DesktopPath) actually returns /C:/Documents and Settings/manning/Desktop/ so make sure you dont add to many /
I save a report of new quotes to send to our sales guys using the following path filewin://Ukex-as-1/filemaker/Reports/New quotes.pdf it is run from the remote database and saves on the server where filemaker server 10 is installed.
I hope this helps