Monday, 24 June 2019

Printing Invoices to Attachments of Sales order, Journal or Customer in D365FO

If you print the Sales invoice report to the built-in File print destination, you cannot get much except for downloading the output report in the browser. Consequently, you cannot use this print destination in batch either. We had the requirement from our client to email invoices but also to save them to Attachments of the related sales order, all that performed in batch during the posting. We managed to achieve this scenario using the Docentric free-edition tool that offers printing reports to Attachments (also in batch) OOTB.

In this article I will explain how to print Sales invoice to Attachments of the related sales order, customer or journal using Docentric File print destination. Everything else (emailing invoices + saving them to Attachments) can be done via built-in Print management setup.

Note: Navigation for printing Sales invoices (Accounts receivable -> Inquiries and reports -> Invoices -> Invoice journal).

Let us see step by step process:

Step: 1

We need to set up Print management setup to point to Docentric File print destination for customer invoice (Accounts receivable -> Setup -> Forms -> Form setup -> General (tab) -> Print management (option)).













Step: 2


In “Output filename and format” section we need to set Output format to PDF also I am going to set filename.

Note: Docentric tool provides the possibility of using placeholders such as @InvoiceId@ or @InvoiceAccount@ in the output filename. Moreover, you can use report specific placeholders in all print destination settings including email body, subject, SharePoint target folder, etc.























Step: 3


In the final step, in Save to Attachments section do the following settings.
  1. Save to attachments checkbox should be set to Yes.
  2. Select File as Document type.
  3. Select Source table as Record type.























That is all it takes to setup printing Invoices to Attachments of the corresponding sales order.

If you want to attach invoices to the corresponding journal or customer records, you should select Journal or Account table as Record type on the Print destination settings form.

Now let’s run the customer invoice report. For this example, I am going to print the invoice (CIV-000233) for the sales order (0002340).







After running the report, attachment will be saved at sales order end, you can see it in below image.

Final result:



How to Get Customer Free Text Invoice "Totals" form field value with X++ in D365FO

Customer free text invoices are an essential aspect of financial management in D365FO. In this blog, I have compiled all the code needed to ...