I would like to add an entry to a database table every time I print out an invoice, to have a record of whether the invoice was printed or not. Is there an easy way to do this?
To do that you need to control the entire process. You may have the user print using a button, and in the script edit the field that sets this invoice to printed. And that means preventing the user from printing using the File menu or changing File > Print to use your script by editing a copy of the menu and set that copy as the actual menu.
Simplest way, and most efficient overall, would be to create a table called PrintTraffic or somesuch and script creation of a new record in this table each time a print takes place. If you are already printing from a script this extra step will be easy. If you print from the menu you will need to create a custom menu, as suggested by planteg.
Thank you, I do have a button for printing, I will give it a try.
Thank you, I will give that a try in the script step, didn't think it would be that difficult, but I didn't think it would be that easy!
Retrieving data ...