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.
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 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
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
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:
- 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
- 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
- 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
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.
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
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
You have the option to create Alerts based on resulting status.
7. Go to System administration > Inquiries > Batch jobs > BATCH JOB > FUNCTIONS > Change status
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.
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
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.
Clicking OK will result in this message:
And the Batch job has now been added to the Waiting batch jobs queue. It can be maintained from System administration > 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!