cancel
Showing results for 
Search instead for 
Did you mean: 

E-mailing invoices

Former Member
0 Kudos

Hi All,

Can anyone give me some pointers on e-mailing invoices (or other documents) from the SDK? I was thinking in the lines of creating a PDF document and then attaching that to the e-mail. Please can anyone who has had a similar problem please give me some advice! I cannot e-mail the standard jpg format as the quality is not good enough and gives a very bad impression!

Thanks in advance,

Adele

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Since I program in C#, i use af freeware pdf creator called itextsharp. Its quite easy to use, but it is not finished yet, which meens that it has some limitations.

Use google to find the library download

-Thomas

Former Member
0 Kudos

Hi Thomas,

Thanks for your quick response. My client is currently using CutePDF. Do you know if it's got a library to interface with?

Thanks,

Adele

Former Member
0 Kudos

Hi Adele

I havent tried CutePDF, but I suppose it can do the trick 😃

-Thomas

Former Member
0 Kudos

Hi Thomas,

Yes, it can do the trick, but at an extra cost of course. Our client does not want to spend any money on this as he reckons it is SAP Business One that does not work properly. Have you seen what it looks like when you print out an invoice that was e-mailed (as a jpg attachment)?

Any suggestions welcome please!

Thanks,

Adele

Former Member
0 Kudos

Hi again

Yes, its not very pretty. I'm afraid the only alternative is to create your own pdf.

I hope you get it sorted out with your client.

- Thomas.

former_member201110
Active Contributor
0 Kudos

Hi Adele,

Have you considered using the email function within ALD? It is not integrated with the standard email system in SBO (it connects via your local MAPI client, eg Outlook, rather than using the SMTP mailer program running on the server) but it can email an ALD layout in PDF format (amongst others) that looks identical to the printed version. It would mean rewriting your PLD invoice layout as an ALD layout.

Hope this helps,

Owen

Answers (2)

Answers (2)

former_member184566
Active Contributor
0 Kudos

Hi Adele,

I'm having the problem of where the quality is being lost in SBO 2004 just like you, what owen suggest works very well. Another way that i found is when you click print and it asks for your print selection you have an option of choosing the microsoft document image writer which comes with office. this will convert it to a image and the quality is good but you would have to attach to e-mail manualy.

later girl

Former Member
0 Kudos

Hi Guys,

Does anyone have a code example of ho to accomplish the exporting to PDF with the ALD and e-mailing, also to print the doc to printer. I don't know the ALD at all!

Thanks a lot in advance,

Adele

former_member201110
Active Contributor
0 Kudos

Hi Adele,

You wont need a code example, ALD already contains the functionality to email. What you'll need to do is load the ALD, create a report and then there are some email specific fields you'll need to map to data fields.

I recommend you download a demo invoice layout from SAP for ALD. There's an import file for an AR Invoice layout attached to SAP note 813796 (once downloaded you'll need to open the XML file and read the comments about localisation as you may need to edit a property in the XML file prior to importing the layout).

To test the email functionality (2004A and 2005A should be identical):

1) Install ALD

2) Go into AdministrationSystem InitialisationPrint Preferences and tick the option to use Advanced Layout Designer.

3) Start ALD

4) Go into AdministrationData Import/ExportData Import--Import Layouts for ALD

5) Use the import window to import the invoice you've downloaded.

6) Open the AR Invoice window. Click on the Print Layout Designer icon.

7) Choose to use ALD, then highlight the new invoice layout and click on the ALD button on the bottom right of the window. This should open the ALD designer and display your invoice layout.

😎 Choose Project--Properties from the top menu. Scroll down the window and you'll see fields for emailing.

9) You can use the formula button to the right of each field to map each option to a field in the database (eg you can map the Email To field to the BP Contact email address). For a simple test, you could just hardcode values in the fields.

10) Exit the window (ignoring the warning about the fax fields being empty!), save the project and exit ALD.

11) Click on the Update button on the previous window to accept the changes you have made to the layout (Very important!)

12) Print Preview an invoice. This should display as an ALD layout.

13) In the Print Preview window, click on the Email button.

14) Choose your format (PDF seems to work the best) and then accept to send as an email.

15) Providing that all the above has worked correctly, you should see an email in your Sent Items folder in Outlook and the recipient will receive an email with the attached invoice.

Hope this helps,

Owen

Former Member
0 Kudos

Just for interest sake... iTextSharp can be used with Vb.Net as well, not only C#.

former_member184566
Active Contributor
0 Kudos

Hi Adele

I have looked at iTextsharp, there is a vb version. I have downloaded. I tested the samples, the quality is not the best. Better than jpeg. I'm currently using something similar to cutepdf, except it is better, gives you mailing options, save to disk, desktop and so on. It's for free, it's not automated and also uses ghost righter like cutepdf. You choose it as a printer as you would with cutepdf.

Hope this helps

Former Member
0 Kudos

Hi Louis,

Can you export the sbo print layout to this pdf writer using vb code?

That is what iTextSharp can do.

Thanks,

Adele

former_member184566
Active Contributor
0 Kudos

Hi Adele

No, as far as i know there is no vb api for it. All done through the front end.

Yes, i know Itextsharp is for that, i've downloaded it,when you use it through vb the quality is not the sharpest but an improvement over jpg.

Hope this helps

Former Member
0 Kudos

Hi Louis,

The quality of my exports are perfect. No issues there.

Adele

Former Member
0 Kudos

Hi

It is possible to access the Email methods through SDK. However... It is NOT possible to get the jpeg file that SBO generates.

I solved the problem by creating my own PDF which then would be mailed. I think you are on the right path

-Thomas

Former Member
0 Kudos

Hi Thomas,

Thanks for your reply. How did you create your own PDF? What did you use?

Your help is appreciated!

Thanks,

Adele

Former Member
0 Kudos

Hi Thomas,

We have these same challenges and are very interested in get in contact with you regarding your method.

Can you contact us by e-mail info@completeone.no

-Geir