Steve Shebuski, VP of Digital Strategy
Guiding businesses through their digital transformation journey
There are two batch jobs that you need to set up in order for change-based email alerts to function properly. One job generates the alerts based on the criteria you define, the other actually distributes the emails to the recipients specified. As with any batch job, performance considerations are taken into account to find the right balance between the frequency of alerts, and the processing power required to do so.
First Batch JobThe first batch job is located at System Administration > Periodic > Alerts > Change based alerts.
- Check the Batch Processing checkbox, and select the batch group you created before from the dropdown
- Click the Recurrence button to specify how and when you want this job to run
- Every minute being the most-frequent option available
- Click the Alerts button and uncheck all of the boxes within the popup window, as you do not need to receive alerts every time the job runs or fails in this example
The second batch process that you need to address is the email distribution job. This job is accessed at System Administration > Periodic > E-mail Processing > Batch. In your case, the setup is identical to the previous job. If processing power is not an issue, set the recurrence for every minute, to ensure that you receive alerts as close to real-time as possible.
Create Alert Rule
Now that you have your setup process complete, it is time to create the alert rule itself. AX still needs to know what event will trigger this alert, as well as who you want notified with an email.
Following your Purchasing Manager example, navigate to Accounts Payable > Common > Purchase Orders > All Purchase Orders, right-click on any PO in the list, and select “Create alert rule…” from the popup menu. This brings up the Create Alert Rule form. At the top, choose “Record has deleted” in the Event dropdown.
Notice the Field dropdown automatically changes to “<All fields>,” as you do not need a particular field specified for this alert. Select the “All records in Purchase Orders” radio button, to notified yourself when any PO is deleted. Keep the “No end date” radio button selected, and keep the default text in the subject and message fields as well. These fields are only displayed on the internal ‘notification’ alerts, whereas your subject and message text are pulled from your email template.
Under ‘Alert who,’ choose your user ID from the dropdown, and under ‘Other alerts,’ uncheck the “Show pop-ups” checkbox and check the “Send e-mail” checkbox. Again, the popups are utilized for internal notification situations. The email address previously entered into your user’s options will default into that checkbox field as well.
Once this alert rule is created, you are set to begin testing functionality. Keep in mind that you need to create a new rule for each user that wishes to receive this alert.
Testing this alert rule is fairly straightforward. Find a Purchase Order that is no longer needed (or create a dummy one just for this purpose), and delete it from the form. Assuming all of your configuration is correct, you will receive an email within +/- 60 seconds (or whichever frequency you chose) stating that a PO deleted.
If you do not receive the email, a good place to begin troubleshooting is the batch job history. Navigate to System Administration > Inquiries > Batch Jobs > Batch Jobs, highlight the change-based alert job that you set up first, and click the Batch Job History button above. This will show a list of all the instances that this job has run, which you sort by date to find the most recent. If any of the entries show a status of “Error”, click the Log button above to view the error log details.
Use this method to guide you until emails begin appearing as expected.