Docentric AX Blog

Email reports with customized body and additional attachments

Let’s say that we want to email purchase orders with customized body and two additional attachments, which are arbitrary documents stored on file system, SharePoint or database. Instead of attaching documents with static content, we can also attach related reports, for example Purchase order product […]

Email purchase order to specific vendor contacts

Let’s say that we want to email purchase order to a vendor primary contact or to all vendor contacts which have a specific contact purpose assigned. First we have to create a Contact information purpose. Navigate to Company/Organization administration/Setup/Global address book and open the Address […]

Print Sales Invoice to printer from code

You can print an existing Sales invoice to a printer through the following code, no matter how the Print Management setup of Sales Invoice might look like:

Print Sales Invoice to PDF file from code

You can print an existing Sales invoice to a PDF file named as SalesInvoice_<InvoiceId>.pdf through the following code, regardless of how the Print Management setup of Sales Invoice might look like: