Zap Notifications / Alerts App provides In-App notifications to Dynamics 365 Users. There are mainly 2 categories of Notifications:
1. Bell Notifications: This could be used for:
– General Notifications – e.g. one time announcements
– Trigger Notifications – e.g. Case / Lead assigned
– Recurring Notification – e.g. Reminder to fill-up time-sheet every Friday OR Reminder for XYZ Opportunity approaching estimated close date
2. Form Notifications: This is mainly for displaying notifications on form. e.g. Account is on credit-hold
A very common requirement by Dynamics 365 / CE / CRM / Power Apps Administrator is ability to get automatically notified of FAILED SYSTEM JOBS!
Why we need to monitor System Jobs
It is quite common to use asynchronous workflow, asynchronous plugin, roll up field, bulk delete or import features. Since they are asynchronous, most of the time we will not get a notification if they fail until we go and check status.
One solution to this problem would be to review the System jobs regularly and ensure that corrective actions are taken for failed system jobs. However this manual approach is tedious… We rather need an automated approach!
Here either Zap Notifications / Alerts App OR Zap Report Scheduler can help!
Zap Notifications/Alerts App allow building recurring notifications which can periodically (hourly/daily/weekly) execute a FetchXML Query (eg query to check if there are any failed system jobs in past 1 hr) and notify the administrator with an In-App Notification!
For explanation of how Zap Report Scheduler App can help with this use-case, please refer our other blog: https://zapobjects.com/microsoftdynamics365_crm_ssrs_report_scheduler_app/notify-administrator-of-failed-system-jobs-using-zapobjects-report-scheduler-app-for-dynamics-365-for-sales-customer-service/
Lets go through the steps on how we can automatically get notified of failed system jobs using Zap Notifications/Alerts App:
Step 1: Create Zap Recurring Bell Notifications Configuration record: Select Entity and enter FetchXML Query:
Points to be noted:
Recurring Bell Notification is of 2 types:
- General Notification: This type can be used for static recurring messages like: reminder to fill time-sheet every Friday.
- Entity related: This is dynamic and can be used for querying entity data.
Here we are using type: Entity related – for fetching information regarding failed system jobs.
Below is the Fetch XML Query used: <fetch version="1.0" output-format="xml-platform" mapping="logical" distinct="false"> <entity name="asyncoperation"> <attribute name="asyncoperationid" /> <attribute name="name" /> <attribute name="regardingobjectid" /> <attribute name="operationtype" /> <attribute name="statuscode" /> <attribute name="ownerid" /> <attribute name="startedon" /> <attribute name="statecode" /> <attribute name="message" /> <order attribute="startedon" descending="true" /> <filter type="and"> <condition attribute="createdon" operator="last-x-hours" value="1" /> <condition attribute="statuscode" operator="eq" value="31" /> </filter> </entity> </fetch>
Step 2: Configure the notification message that needs to be displayed:
Here you can add dynamic field values in the HTML message!
Below is the message text being used:
Message Subject: {{!asyncoperation:name}}
Message Description:
<b>Regarding : </b>{{!asyncoperation:regardingobjectid}} <br>
<b>Started On : </b>{{!asyncoperation:startedon}} <br>
<b>Error Message : </b> <br>
{{!asyncoperation:message}}
<b>URL:</b>{{URL}}
Step 3: Configure the recurring schedule!
Here we have scheduled the recurring notification to run every hour and check for any failed system job!
The In-App notification can be displayed either in Right-Pane or form center (as shown in below screenshot):
For more information, please refer below links:
Zap Notifications / Alerts App feature page: https://zapobjects.com/apps/zap-notifications/
For list of all Zap Apps check-out: https://zapobjects.com/
Latest Updates from Zap Objects (Nov 2020):
- New Version Released: Zap Notifications/ Alerts: Now supports ability to notify immediately for certain message types (Without the need to click on Bell Icon)! (E.g. Notify of failed system job immediately to Administrator)
- New Version Released: Zap Report Scheduler App :
1. Now supports even Hourly Scheduling
2. Ability to Schedule multiple reports in Single Email! - Our Next App is scheduled to be released in Jan 2021!