D365FO allows users to create alert rules directly from forms, and what’s interesting is that any active filter applied to the form at the time of creating the alert rule is automatically included in the rule. This means that the D365FO alert rules are implicitly applied to the filtered records, which might be confusing. That’s why in this article we will describe how Docentric Free Edition helps by offering the Conditional alert rules feature. This feature allows users to expose and manage the underlying filter rules.
What Is Missing in the Standard D365FO Alert Rules?
Standard D365FO applies the filtering rules "behind the scenes". Therefore:
- Many users are not aware of this feature, so they often get unexpected results. For example, they apply the alert rule to the previously filtered form, but they expect the rule to be applied to all records.
- Even when user knows about this feature, once they create the alert rule, they cannot see the exact filtering rule that existed on the form at the time of creating the rule, which complicates the further changes or troubleshooting.
- Not all requirements can be solved in this way, for example if alert is related to lines (on SO or PO).
To quickly check this, you can open one form, for example Sales orders, filter it by some criteria, for example show only Open orders, and then click the Options > Create alert rule button. This new rule will be automatically applied only to Open orders.
Solution: Docentric Conditional Alert Rules
Docentric introduces a feature we call Conditional alert rules. It provides a powerful way to configure alert rule condition via the Docentric improved Query form.
While looking for a nice example to demonstrate this feature, I found some interesting use-cases, for example on this link:
- Alert for all Purchase orders in a specific order pool having passed confirmed date and not yet received.
- Alert for all Sales orders that have been created two days ago but not have been fully delivered yet.
- Alert for when Sales line price is set to zero, but only when quantity is positive.
- Alert when certain fields are updated on Sales order created by yourself
But I wanted to make it a bit more complicated, so I will demonstrate how to use Docentric conditional alert rules to solve the following challenge: alert me when Quantity value is changed on any SO line having Warehouse = 13
There are 2 challenges in this requirement that standard D365FO cannot solve.
Challenge 1: "Any SO line" requirement
If you click the Options > New alert rule from the SO list view, you won't be able to select the SO lines table, as they are not one of the form data sources. You will need to open the SO detail view, where the SO lines are available as form data source. But now there is also an underlying form filter applied, to show only the current SO. You can see this in the image below.
How to apply the alert rule to all SO lines, not just the lines for a current SO? We will use a trick, to open the SO lines table in a table browser. BTW, Docentric also offers an improved table browser and you can reach it through this link:
https://<environmentURL>/?mi=DocTableBrowser&tableName=SalesLine
Learn more about Docentric Table Browser >>
This opens the SO lines table in a list view, and from there, you can apply filters and create alert rules as usual, including alerts for events across all records, not just one. To do this, click the Options > Page options > Advanced filter or sorting button:
Challenge 2: "SO lines having Warehouse 13" requirement
We want to be notified when the Quantity field is changed only on SO lines having the Warehouse = 13.
To apply a filter based on the Warehouse field, you need to join an additional data source, Inventory dimensions. Below is a screenshot of a query after this data source is added.
Next, on the Range tab, you should add the record with Table = Inventory dimensions, Field = Warehouse and Criteria = 13. Click the OK button to confirm the creation of this new Alert rule condition.
In the next step, again from the Docentric table browser form, click the Options > Create a custom alert button, to create a new Alert rule based on this previously created conditional rule.
Once the form is opened, you’ll see that the previously created Alert rule condition is applied (look at the Condition criteria field, or click the Alert rule condition menu item to further inspect or modify it).
Here you need to configure the following:
- In the Alert me when section:
- Table name: Order lines
- Field: SalesQty
- Event: has changed
- In the Alert me for section:
- select the checkbox All records in Order lines
Finally, confirm and save the alert rule.
So, if an alert rule is conditional (the Is conditional field is turned on), an alert notification will be created every time the alert rule event occurs (based on the Alert me when and Alert me for settings) and when the rule condition criteria (the Condition criteria field) is fulfilled at the same time.
In other words, when the Quantity field is changed on any sales order line, and the Warehouse is equal to 13 , an alert notification will be generated.
How Can We Manage Alert Rule Conditions?
Remember what we wrote in the introduction: with a pure standard D365FO behavior, once you create an alert rule, you cannot see the actual filtering rule that was implicitly applied (by existing on the form). This is how Docentric can help:
From any form click the Options > Share > Manage my alerts menu item, to open the Manage my alerts form. Here you can view and update alerts that have already been created.
Select any alert rule and click the General > Alert rule condition button. This will also open the Alert rule condition form we already saw above.
We have used a rather complicated example where we wanted to reach all SO lines, that’s why we had to start from the Docentric table browser. But for simpler cases, you can use the regular way of creating a new alert rule: Create a custom alert -> Create rule condition form. In this form, you can also create and manage an additional condition by clicking the Alert rule condition button:
Conclusion
Whether you're using the built-in filtering in Dynamics 365 or leveraging Docentric improvements, creating alert rules for a specific subset of records can help you stay focused on what truly matters. Instead of getting overwhelmed by unnecessary notifications, you can set up smart alerts tailored to your business logic.
You’ll be surprised how much more useful alerts become when they’re precise!
See also
Docentric Query Browser: Build queries and perform ad-hoc reporting >>
Docentric Table Browser: Explore, search and edit table data within D365FO >>