Change-based alerts in Dynamics AX 2012 are an underutilized tool that can create greater transparency within your environment by helping you keep up-to-date with system changes. The two types of alerts that are currently available are ‘notification’ and ‘email’ – the former being internal to the AX environment, while the latter is external. This post will focus on the email portion of alerts, from potential uses to system setup to testing functionality.
Change-based alerts are commonly used for exactly what the name implies – when system data is changed or manipulated. The options that AX 2012 provides are:
- When a field’s value has changed
- When a field is set to a specific value
- When a record is created
- When a record is deleted
As an example, suppose you are a Buying Manager and you oversee all purchase orders submitted to vendors. You would like to be notified any time that a PO is deleted so that you can inquire to your staff about the change. In this case, we would setup an alert rule on the Purchase Orders form within the Accounts Payable module. Before creating the rule however, several other configuration steps must be completed first.
Any user that wishes to receive email alerts must have a valid email address assigned to their user account. Navigate to System Administration > Users > Users, select a user account and click the Options button to access Figure 1.0.
A batch group should be created in order to properly setup the batch job schedule. Call the group “Alerts” or something similar. Navigate to System Administration > Setup > Batch Group, as shown in figure 1.1. Also ensure that your batch server is enabled by highlighting your newly created group, then clicking on the Batch Servers tab and adding it to the “Selected Servers” side of the form (figure 1.1.1).
If not already configured, the email parameters form must be filled out with your outgoing server’s SMTP information. Navigate to System Administration > Setup > System > E-mail Parameters, as shown in figure 1.2.
Email alerts utilize a template that contains the subject & body text of the email to be sent. This template can contain static text, HTML, and/or merge data which will pull data directly from the alert itself. For more information on adding data to your email template, reference the Microsoft TechNet article located at http://technet.microsoft.com/en-us/library/aa834423.aspx
To begin creating your template, navigate to Organization Administration > Setup > E-mail Templates, as shown in figure 1.3. Create a new line, and provide it an ID, description, default language, as well as the sender’s name and email address you would like displayed to the user receiving the message (this does not have to be a valid person/email within your organization). Then, create a new line in the lower-half of the form and specify the language, subject text, and layout format type you would like to use. In our example from before, a good subject for this template might be, “Record has been deleted in Purchase Orders.”
Once this is complete, click on the E-mail Message button on the form to edit the email’s body.
Now that we have a template created, we need to tell the system to use this template when an email alert is generated. This is specified in the System Parameters form, accessed via System Administration > Setup > System Parameters. Click on the Alerts tab, and under Email Alerts, find your newly created template ID in the dropdown, as shown in figure 1.4.
Figure 1.4: System Parameters form.
Continuation to follow…