
Business Central how-to: get notified on failed Job Queue entries for better transparency
Reading time: 3 - 5 minutes
Something that you may have noticed on the Microsoft Dynamics 365 Business Central Role Centre recently is a section on Job Queue Tasks, like below:
This shows how many automated tasks Business Central has queued up, in process or failed. This is one of the areas for easily tracking the state of your automated BC tasks in the Job Queue, without having to manually check on it. Something you may do now since a failed Job Queue may not run again, potentially halting work on the system and your business processes.
In this blog, we’ll cover how to get notified of failed Job Queue Entries and how we can tweak the above Cues on the Role Centre, because having the Tasks in Queue box as bright red for what are just tasks patiently waiting to do their job can be annoying.
Job Queue Notifications for failed entries can be sent either ‘in-product’ or ’external’ as Microsoft put it. Essentially, you can either have a notification on the front page of Business Central or receive and email via Power Automate. We’ll cover both, but the external email route does require a Power Automate Premium license:
Get notified of failed Job Queue Entries within Business Central
If you go to the Assisted Setup page there will be a task under the Do more with Business Central section called Set up Job Queue Notifications. Click this
Follow the assisted setup wizard as required. Pick if you want to Notify the user who initiates the job queue and/or the Job queue notification administrators listed on this step.
Set to receive In-product notifications. We’ll also have to make sure the Control Notifications with Business events is selected if we want to use the Emails option that we’ll cover next.
Next, set if you want to Immediately be notified or the threshold for failed entries prior to notification.
Once Next and Finish is selected, you’ll be good to go. Whenever a job queue fails from here on, on the BC role centre, you’ll get notifications like so depending on the amount failed:
These will have options to restart the failed job, or show more details to see the failed job(s) in the job queue entries page:
Get emails for failed Job Queue Entries in Business Central
The steps start the same as the previous option. But we need to ensure the Control Notifications with Business Events is selected during the Set Up Job Queue Notifications wizard:
After going through the rest of the wizard, it will tell you that you need to finish setting this up on the Job Queue Entries page. Go here and select Automate Job Queue Notifications.
Select Notify in Outlook when a Job Queue in Business Central fails to create a Flow in Power Automate for this notification.
You can then set a name for the flow and tweak the integrations used if needed.
Included will be an option to set a CC email(s) if needed. This could be useful to include a shared mailbox for your team so more than just yourself is aware of any critical failures.
Clicking Create flow will then finish setting this up. Depending on if you’ve used Power Automate before, this could be finished and ready! You may get a notification like so though if there are any issues:
In my case, this was because my account did not have a Power Automate Premium license. So, I had to acquire one and turn this flow on manually after the fact. For users more acquainted with Power Automate, you can try adjusting this flow as well for individual needs.
After this is enabled, emails were sent to my account like so whenever a Job Queue then failed:
Tweak Job Queue Task Cues in Business Central
Lastly, to make the appearance of our front page make a bit more sense, we can use Set Up Cues from the Job Queue Tasks header to adjust when these cues start going red. Ideally, we don’t want our queued-up tasks to appear red, those are just jobs waiting to do what we’ve told them to!
Here we can set the thresholds for when the style (colour) changes. I’ve adjusted the below so that Tasks Failed turns red as soon as 1 task fails, by adjusting Threshold 1 to 1, and the Tasks In Queue to no longer go red by adjusting the Threshold 1 & 2 to incredibly large numbers it’s likely not to hit, though you could also just adjust all the styles to Favourable as well.
Note the personalised column. This won’t affect other users and can be reverted by unticking the box! This will then adjust our Job Queue Tasks to better suit how things work.
And that’s how we can get notified about our Job Queue Entries failing in Business Central and improve some of the transparency around them. You can also find our video showing these Business Central Job Queue processes on YouTube.
If you’d like to speak to us about training, moving your Business Central support or an ERP implementation, please get in touch today.