Title
PDF Export with file name according to serial number
Post
Hi,
I have orders in my database that are continously and automatically numbered for unique identification (this field is called order ID).
I'd like to be able to create a script that allows me to:
- go to a specific export layout so that the PDF looks accordingly
- export the layout as PDF file
- save the exported PDF where its file name is the order ID, for example: "12500.pdf" where 12500 would be the order ID
- return to the layout where I initiated the script (called "Browse Orders")
I haven't figured out how to get the saving of the file done according to its order ID.
Thank you!
Adapting from a script where I save a PDF...
Set Variable [$Path ; Value: "file:" & Get ( DesktopPath ) & yourTable::OrderID & ".PDF" ]
Save Records as PDF [Restore; No dialog ; $Path ; ... //specify options appropriate to your needs]
This saves the PDF to your desktop. If you want it saved to a different location, you'll need to specify the path to that location in place of Get ( DesktopPath ).