mrswombat Posted May 15, 2012 Posted May 15, 2012 Hello, I generate a fairly large number of invoices every month. Each invoice has a unique number and I currently save four separate electronic copies (customer & remittance copy, accounting and department copy). I'd like to automate all of this. Here is what I would like the script to accomplish in my fantasy world: - Perform a find with a box that pops up allowing me to specify the parameters of the find request from specific fields (I can do this manually as well, but am hoping to just make this part of the script) Once I have this found set of records, I would then like: - To save them as individual .pdf records to a specific destination on a shared drive (can this be set such that I can specifiy the parameters as well? This would change slightly each month since I create a new folder for the month I'm currently billing) and - To be able to specify the file name of each of these records (i.e., Invoice number.pdf) Thank you ahead of time for the help! :)
bcooney Posted May 15, 2012 Posted May 15, 2012 This demo might get you started on the right track. I question the need the save the PDFs. If it's data in the system, then you can easily regenerate the PDF. Find is easy to script. Go to layout Enter Find Mode (pause) ~~user enter search criteria Perform Find. 1
mrswombat Posted May 17, 2012 Author Posted May 17, 2012 Thank you for this bcooney, it's exactly what I'm looking for. I copied your Email invoice script minus the actual send email part and it worked beautifully. However, I have a script that loops through a found set of records and sets a value field that I would like to combine it with. I can get these scripts to work separately, but not together. Attached is a screenshot of what I have. Any idea what I'm missing here? I tried including the Set Variable within the loop...no luck.
bcooney Posted May 17, 2012 Posted May 17, 2012 Glad that got you started in the right direction. From the snippet you've posted, it seems to me that your loop ends too soon. I would put the Set Variable and Save as PDF inside the loop, just before the Go to Next Rec. You do not need to Go to Field, btw. Also, the Save as PDF is set to Records being Browsed. But, wouldn't you want "Current Record?" Actually, what I would expect to see is that you Loop thru Invoices, but Save as PDF from the Line Items table. Therefore, you would gtrr InvLI and Save as PDF there (I usually GTRR in New Window, Save as PDF, and Close Window). The Go to Next. Tables: Inv and InvLI Go to layout (Invoice Form) Go to First Loop Set a field Gtrr Inv>Invli, new window Layout = My Invoice Print, based on InvLI Save as PDF Recs Browsed (all line items this Inv). Close Window //back at invoice list go to next, exit last End Loop
mrswombat Posted May 18, 2012 Author Posted May 18, 2012 Excellent. I made your suggested changes and it works perfectly. I think I easily cut off a minimum of 1/2 hour to my monthly billing process because of this nifty script. Thank you so much for your invaluable help bcooney!
Recommended Posts
This topic is 4572 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now