Is this part of a script or are you selecting Save as | PDF from the file menu?
I'm just selecting Save as PDF from file menu...
Why not go ahead and create a script with Save As PDF (and specify current record in the script). Don't specify anything else (leave unchecked 'perform without dialog' and don't specify file name. Put it at the top so you can even Ctrl+1 to fire it off. It will be even faster than selecting File > Save/Send As > PDF.
Thank for the input LaRetta,
As a newbie, I'm not too familar with creating a script (don't really know what the script is lol)
Could you please help? =)
No problem. Scripts are simply a series of 'macros' which record (so-to-speak) actions for you. Across the FileMaker menu ( File * Edit * View etc) you will see Scripts. Select ScriptMaker and (bottom, left) select New Script. Entitle it 'PDF Record' or whatever you wish.
Now down the left side are groups of actions with script-steps inside. Scroll down the list until you come to the bolded section called Records. Double-click 'Save Records As Excel'. This will insert that script step into your script. Below left, you could specify 'perform withou dialog' by checking the box (but you won't do that that this time.
Bottom right, you can specify the file name (or you could use a variable and calculations to name the file). But for now skip it - you can name the file when you are asked. Below that is 'specify options.' Click Specify and change Save: Records Being Browsed to say Current Record. Say OK. Then close the Script window (and save it when asked) because you are done specifying it.
Make sure the script is checked in the 'Manage Scripts' dialog (which lists all your scripts). The first 10 scripts (that are checked) will fire with CTRL+(number). To see the numbers which will fire them, close Manage Scripts. Now when you click 'scripts' in the menu, it will provide a list and, to the right, show the ctrl-number which will fire each of them.
As an aside, the best way to script that I've found, is to create a comment (scroll down list of script steps to bottom and see Comment). Double-click to insert into your script. Now click button below "Duplicate' and make several of them. Use this as an outline of what actions need to happen. This helps you get a visual of your thinking as you walk through the 'actions' that need to happen. Make all your 'comment' outlines before you ever start inserting the script steps in between them. So it might be:
# I need to find all records with date of today over in the Invoices table occurrence
# So I'll go to the Invoices Detail layout
Go To Layout [ "Invoices Detail" (Invoices) ]
# Now lets find the invoice records
Enter Find Mode [ ]
Set Field [ dateField ; Get ( CurrentDate ) ]
# If no records found, tell the user and go back to the main menu
# To handle the error (no records found) myself, I need to error trap
Set Error Capture [ On ]
# This suppresses the FM error message
Perform Find [ ]
If [ Get ( LastError ) = 401 ]
# 401 means no records were found so inform the user and go back where they started
Show Custom Dialog [ OK ; "Sorry User but no records were found." ]
Go To Layout [ Original Layout ]
# Since the script is still running, it means that records were found
# I want the User to then go to a report layout and generate a report
Go To Layout [ Invoice Report (Invoices) ]
.... and so on. By creating your comments first, you can add 'thinking' between as you work through it. It may seem simplistic but when done and you finish your script, it will also provide you with clear thinking so that, when you come back to it later (or someone else viewing your script), your thinking and 'walk-through' will be very clear and easy to understand. It is one of the best habits I have ever developed.
UPDATE: I kept the 'thining' very basic so I could also show you generalized script thinking. You don't have to be THIS basic in your notes but however you wish to outline to help yourself, will help you or someone else later, so comment freely. Added ... of course I don't comment every script; simple ones aren't commented but anything which needs clarity of sequence or needs to be noted for reference is always included.