Lots of questions for one post. It's usually better to put separate questions in separate posts. For example, if I was looking for something about renaming a PDF file, I wouldn't look under "Hyperlink in EMail Message".
Renaming the PDF:
I almost hate to post this because I never use Action Scripting anymore so I can't tell you how to do it with A/S other than to use in-line xbasic. (Or, if there is nothing else in the script, just make it an xbasic script.) Unfortunately, you haven't received any other replies so here goes....
I'm not sure how you are printing to PDF but there is no good way that I know of if you are just using the "PDF Icons" in the print preview screen. Personally, I would never ask my users to use those icons - too much confusing may ensue. I guess the secret is the Print.SaveAs() function. If you are printing from a script, you could do something like the following. In this case, 'rpt_name', 'clnt_filter', and 'order' are variables based on some other choices made by the user. You may or may not need to set variables in your application. Also, by using "datapath", the file is always saved on the server rather than on various local computers.
Obviously you will need to determine your customer number (and the invoice number in this example) but there are many ways to do that - it all depends on your particular situation.
Code:
DIM datapath as C IF a5.Get_Master_Path() = "" datapath = a5.Get_Path()+chr(92) ELSE datapath = a5.Get_Master_Path() + chr(92) END IF 'Put them in a subfolder so they are easier to find, delete, etc. file_att_name = datapath + "Invoices_emailed\Invoice_" + alltrim(this_cust_number) + "_" + alltrim(this_inv) + ".pdf" report.SaveAs( rpt_name, "PDF", clnt_filter, order, file_att_name )
This may be an issue when working with any external e-mail program. I think Alpha only sends text to the external program but it has been awhile since I worked with this. I know it can be done using A5's internal e-mail.
I recall an issue with an embedded e-mail address link that was resolved by having the user manually add one extra space in the e-mail then backspace over it. Unfortunately, that wasn't a very robust solution (they sometimes forgot) and it was a real pain when sending a few hundred monthly invoices.
Sorry, I can't provide any better or more definitive solution to this one.
Advantages to using A5 e-mail:
1. Hyperlinks?
2. The main advantage (IMHO) is that it is under your control as the developer since it is a separate e-mail from all the other stuff the user may have. See the attached "advantages" dialog that is from my own "Trak-It SP" application for some ideas. Note that in this particular case I even created two separate e-mail profiles so the "confirmation" e-mails could be kept separate from all other e-mails sent from within the application. This was done because confirmation e-mails only need to be kept for a very short time (2-3 months) while some of the other e-mails need to be kept longer because of potential "but you never told me" situations.
(I'd like to hear from anyone else who has made use of multiple e-mail profiles. I've never heard of anyone else doing it but it has turned out to be very useful for me.)
Leave a comment: