Batch print management destination processing errors

We’re experiencing errors when batch processing documents when using the ‘use print destination’ option. We’ve seen this across both the sales invoice and the customer account statement.

We are experiencing this issue for both:

  1. Sales invoice configured with a Docentric email destination, using a Docentric report design, processed via the standard post invoice batch, using class SalesFormLetter_Invoice
  2. Customer account statement configured with a Docentric email destination, using a SSRS report design, processed via the standard customer account statement batch

We have not encountered any errors when processing single documents via the UI/interface, only in batch prpocessing.

In scenario 1, we’ve observed that posting invoices using the print destination is generally successful, but there are intermittent errors where a document fails to send. The error reported in the batch log is;

“An error occurred when running report CustomSalesInvoice.Report in batch. Contact your system administrator for more information.”

Importantly, the print management setup for the sales invoice document is not CustomSalesInvoice.Report. CustomSalesInvoice.Report is however the print management default in a different legal entity. All other successfully processed document are correctly using the report design configured in the print management setup parameters for the sales invoice. But for those documents that fail to process in the batch, a different report format is referenced.

In scenario 2, we are seeing a similar issue. This tends to be a larger batch with more records/document, that ultimately ends prematurely with the following error in the batch history.

“An error occurred when running report CustomCustAccountStatement.Report in batch. Contact your system administrator for more information.
Batch task failed: An error occurred when running report CustomCustAccountStatement.Report in batch. Contact your system administrator for more information.”

Again, like the sales invoice, CustomCustAccountStatement.Report is not the report/design configured in the print management setup, but it is the default for a different legal entity.

In the account statement batch, we’re also seeing the system loop through the maximum retries on the batch task setup, and duplicating/successfully sending account statements up to this limit. Ie, a single customer will receive their statement email up to 6 times, with the maximum retries default configured in our system to 5.

Hi @CSARI,

Just to clarify an important point here:
the Print management framework and batch processing are standard Dynamics 365 functionality and are not related to Docentric.

Docentric does not decide which report format is selected by Print management. The report format resolution always happens in the standard Dynamics 365 Print management framework. Even when an SSRS report is extended or a Docentric design is used, Docentric only takes over after the report format has already been selected by Dynamics 365.

Because of that, the first step is to confirm that everything works without Docentric in the pipeline. We recommend testing the same scenario using the built-in SSRS report design and a standard SSRS print destination, and then running the process in batch.

If the issue still occurs in that setup, it confirms the problem is in the Print management or batch framework configuration rather than Docentric. If the standard SSRS scenario works correctly in batch, then we could continue investigating the Docentric print destination configuration.

This isolation step is important because Docentric does not control how Print management selects report formats or how batch jobs execute and retry tasks. It only handles document generation and distribution once report execution is triggered by Dynamics 365.

@AmirO Hi Amir, i’ve tested the same account statement batch using a standard D365 print destination (the email option) along with a Docentric report design, and this processed successfully. The batch job ended and there was no error log reference to an invalid design.

When i run the exact same batch but with a Docentric email destination, the job ends prematurely, it utilises the maximum retries and incorrectly sends duplicates, and i have a error in my batch log as i’ve described in the opening post.

My presumption is that there is some issue wiith the Docentric destination. The standard print management framework is customised by Docentric is it not? Given we have an option to route doucments to ‘Docentric destinations’ rather than the standard ones?

Hi @CSARI , in the first part you are mentioning that you were using Docentric report design with standard D365 print destination which is not possible to do. Running the report without Docentric means that you need to deactivate the report in the Report setup entirely by switching the flag Is active to No. Then you need to select SSRS print destination and run the batch.

You also need to make sure that you are configuring the correct report i.e. you know which report is actually executing. Using the approach described above and seeing the expected changes will confirm it as you are not running interactively so you can’t use Discover report technical name.

Standard print management framework is not customized by Docentric. Docentric only adds additional print destinations that are used for document output when configured.

I also recommend following the steps in the error and contacting system administrator to see the exact error that happens as that will make the troubleshooting much more efficient.

Hi @SemirT, can you clarify what you mean when you say its not possible to setup print management with a Docentric report design with a SSRS/standard D365 print destination? I’ve done this in our production environment. I have the customer account statement setup in print management setup with a standard email destination (not docentric destination) with a report that is a active Docentric report with a Docentric design. When i run a batch with this setup, i have no issues. When i run the same batch but change the destination to Docentric email, i get the issues described in the opening post.

Is there a way to connect on a call so i can show you the issue?

We’ve reviewed trace logs etc and there is nothing helpful. We’re still unable to reliably distribute/email documents using the Docentric destination.

Hi @CSARI,

Yes, you can send an email with the relevant details to support@docentric.com and we’ll get back to you soon. (Actually, I see somebody from your company already reached out.)

1 Like