Batch class issue

Hi All,

I am trying to run the customer statement report. as a batch that sends reports by email, but in case the customer does not have email, an error is returned, although redirection setup on Docentric is configured. Note that this happens only in production, but on UAT it is working and redirection is working correctly.

Any hints?

Hi Waed,

Based on your description, you can try the following:

  1. Run one of the customer statements with missing email interactively and see if redirection works there.
  2. Turn on tracing (Tracing - Docentric AX) and see what you get back.
  3. Verify redirection settings on the report to be identical as in the UAT where it works.

I hope this helps.

1 Like

Hi Albin,

I the development environment, I have the same data and configuration, but there is no issue with it. The redirection is working correctly, so in this case I am not able to know what the issue is since the code is running correctly and customers with empty emails are redirected to internal email.

Any hint?

Hello Waed,

As we already suggested, please run this report interactively only for the document that triggers the error.

The first step to check is if the address is missing. Before printing the statement, enable the option to Open email before sending:

The email will download to your browser as an eml file. You can do the same in DEV and compare the two generated emails.

Next, please share your redirection setup in PROD and DEV environments. You say the setup is the same, but we want to verify this.

Do you mean to run it without batch?

Yes, you need to execute the report interactively to generate the emails.

1 Like