Change-based Email Alerts in Dynamics AX 2012 (Part 1)

Change-based Email Alerts in Dynamics AX 2012 (Part 1)

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.

User Options

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.

Figure 1.0 - User Options
Figure 1.0: User Options form.

Batch Group

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).

Figure 1.1 - Batch Group
Figure 1.1: Batch Group form. 

Figure 1.1.1 - Batch Server
Figure 1.1.1: Batch servers tab.

Email Parameters

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.

Figure 1.2 - Email Parameters
Figure 1.2: E-mail Parameters form.

 Email Template

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

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.”

Figure 1.3 - Email Template
Figure 1.3: E-mail Templates form.

Once this is complete, click on the E-mail Message button on the form to edit the email’s body.

Alert Parameter

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
Figure 1.4: System Parameters form.

Continuation Part 2 here…

Share on Google+Tweet about this on TwitterShare on LinkedInShare on FacebookEmail this to someone