Many processes in Microsoft Dynamics 365 for Finance and Operations can be automated – as either individual tasks or multiple tasks grouped into a batch job. Batch jobs are created for tasks like processing reports, coordinating schedule maintenance, and creating and sending documents such as invoices. Batch jobs are monitored from a system administration perspective, use custom or standard D365 classes, and run concurrently or sequentially using decision trees.

Microsoft’s October 18 release provides new productivity features for batch management. In today’s post, we will first review basic configuration steps for creating a batch job from System administration, and then we’ll explore options for creating batch jobs on-demand in D365 Finance and Operations modules.

Prerequisites

Please read the following articles from Microsoft, as this information covered is used when creating new batch jobs:

Exploring Batch Jobs

Let’s get started!

1. Go to System administration > Setup > Batch group

batch jobs

batch jobs

Batch groups are associated with tasks within a Batch job. Multiple batch servers can be used to support processing.

2. Go to System administration > Setup > Active periods for batch jobs

batch jobs

Active periods for batch jobs is a new, optional feature in Platform Update 21 that provides more detailed control of the time periods during which a batch is processed. For example, a batch may have a recurrence to run hourly every day. For an example depicted in the screenshot above, by assigning the NIGHT Active period, the hourly recurrence will be limited to run only between the hours of 8 PM and 4 AM (GMT).

Creating New Batch Jobs

1. Go to System administration > Inquiries > Batch jobs > +New

batch jobs

A batch job can contain one or more tasks that have a common schedule, recurrence, and alert configuration. Let’s look at the different options on this screen:

Status

  • Withhold – initial status; will not be processed; allows a batch to be edited
  • Canceling – batch is canceling from an executed state
  • Waiting – will be processed at next scheduled recurrence; can be moved to Withhold to pause temporarily
  • Executed – batch is processing
  • Error – can be restarted by changing to Waiting
  • Ended – completed successfully and can be manually re-run by changing to Waiting

Batch Job

  • View tasks – view and edit, or create tasks within the batch
  • Batch job history – review status of previously processed occurrences
  • Recurrence – the schedule for repeated processing
  • Alerts – alerts for events, such as processing failure
  • Log – available jobs with a status of ‘Error’
  • Generated files – outputs from batch jobs

Functions

  • Change status – can be changed to Withhold, Canceling or Waiting
  • Remove recurrence – cancel future processing occurrences
  • Delete – delete the batch job
  • Copy batch job – new for Platform Update 20, will copy tasks, dependencies, and alerts to a new batch job
  • Refresh – refresh the batch list page

2. Go to System administration > Inquiries > Batch jobs > BATCH JOB > View tasks > +New

batch jobs

3. Create one or multiple tasks for the job, associate to a Company account (legal entity), assign a Class name (standard or custom), and associate to a Batch group.

Note than you have the option to use HAS CONDITIONS to identify dependencies between tasks, such as sequence or a task tree based on status of processed tasks. In this example, the Purchase Order Invoice task must have a status of Ended to initiate processing of the Sales Order Invoice task. Conditions can also be used to determine if a different task should run based on the results of a previous task. For example, if the first task’s status is Ended, the second task will run, but if the first task’s status is Error, the third task will run.

Parameters provide options for record selection and will open the standard form associated with the selected Class name (SalesFormLetter_Invoice in the above screenshot). As shown below, from Select, filters can be applied using the default fields, additionally selected fields, or use Joins to allow filters from other tables. In this example, a join has been created to the BRKShipmentEntryDetail table.

batch jobs

4. Close this form to return to the Batch job and then define Recurrence, Alerts, and Change status.

5. Go to System administration > Inquiries > Batch jobs > BATCH JOB > Recurrence

batch jobs

Definitions of the RECURRENCE PATTERN

  • Minutes – the count (fixed interval) for repetition
  • Hours – the count (fixed interval) for repetition
  • Days – the fixed interval for repetition, or select to repeat every weekday
  • Weeks – the fixed interval for repetition, and select one or more days in the week
  • Months – repeat on a specific day (i.e., the 25th) by a fixed interval, or select a specific weekday (i.e., the fourth Tuesday) by a fixed interval
  • Years – repeat annually, or a specific weekday (i.e., the fourth Tuesday) in a specific month

6. Go to System administration > Inquiries > Batch jobs > BATCH JOB > Alerts

batch jobs

You have the option to create Alerts based on resulting status.

7. Go to System administration > Inquiries > Batch jobs > BATCH JOB > FUNCTIONS > Change status

batch jobs

Set the status of a new job to Waiting to initiate processing at the next recurrence interval. Or set the status of an active job to Withhold to edit.

Monitoring Batch Jobs

Go to System administration > Workspaces > System administration. Here you can monitor existing jobs.

batch jobs

Batch Creation On-demand

As mentioned, from within many D365 forms, we can initiate batch processing on a one-time or recurring basis. Some examples include:

  • General ledger > Chart of accounts > Structures > Configure account structures > Activate
  • General ledger > Inquiries and reports > Ledger reports > Ledger transaction list
  • Accounts payable > Invoices > Pending vendor invoices > Process > Batch
  • Accounts receivable > Invoices > Batch invoicing > Invoice > Select

Keywords to look for are Batch or Run in background. Here we will take a look at the Accounts receivable invoicing process and available batch options.

Go to Accounts receivable > Invoices > Batch invoicing > Invoice

batch jobs

Notice the Batch button in the lower right corner of the screen above. Clicking this opens the Batch processing screen (shown below), which gives access to the same Batch job options as explained above, such as, Recurrence, Alerts, and Batch group assignments. We do not, however, have the option here to add multiple tasks to one Batch job or to define any conditional processing. When creating the batch here, we will essentially be adding one task to one batch job, either on a one-time basis, such as for Account structure activation, or on a recurring basis, such as for Invoice generation.

batch jobs

Clicking OK will result in this message:

batch jobs

And the Batch job has now been added to the Waiting batch jobs queue. It can be maintained from System administration > Batch jobs.

batch jobs

Well, there it is… everything you ever wanted to know (or at least a whole bunch) about batch jobs in Dynamics 365 for Finance and Operations.

Happy Dynamics 365’ing!

Avatar for Joe D365

Joe D365

Joe D365 is a Microsoft Dynamics 365 superhero who runs on pure Dynamics adrenaline. As the face of PowerObjects, Joe D365’s mission is to reveal innovative ways to use Dynamics 365 and bring the application to more businesses and organizations around the world.