Microsoft Dynamics 365 Business Central: Adding New Notifications

Dynamics 365 Business Central

Hi readers.
In this post we will discuss about how to add new notifications in Dynamics 365 Business Central. Although this is not difficult, it is a very useful feature. Let’s start with Microsoft’s description.

Notifications provide a programmatic way to send non-intrusive information to the User Interface (UI) in the Web client. Notifications differ from messages initiated by the Message method. Messages are modal, which means users are typically required to address the message and take some form of corrective action before they continue working. On the other hand, notifications are non-modal. Their purpose is to give users information about a current situation, but do not require any immediate action or block users from continuing with their current task. For example, you could have a notification that a customer’s credit limit is exceeded.

The notification that a customer’s credit limit is exceeded:

For ease of understanding, I have prepared four examples this time. Hope they will help you.
1. Notification only: Contains only notification information.
2. Adding actions on a notification: Behind the notification, add Action to open other page.
3. Sending data with a notification: Use the SetData and GetData methods to add data to a notification, which is typically needed when actions are invoked.
4. Using External link: User click on Contact Us it will redirect to my blog.

The examples extend page 42 Sales Order:
You can use OnOpenPage() trigger on Sales Order page or subscribe on OnOpenPageEvent of Sales order.

The available method:

MessageSpecifies the content of the notification that appears in the UI.
ScopeSpecifies the scope in which the notification appears.
SendSends the notification to be displayed by the client.
AddActionAdds an action on the notification.
SetDataSets a data property value for the notification
GetDataGets a data property value from the notification.
RecallRecalls a sent notification.

Notification only

If Posting Date is different from the current date (Today), the Notification will be shown.

Only need a page extension.


Adding actions on a notification

If Posting Date is different from the current date (Today), the Notification will be shown. Then you can choose the Check Work Date action to open the My Settings page.

Page extension:


Notification and Action:

My Settings page:

Sending data with a notification

If the current balance exceeds the credit limit, the new Notification will be shown. Then choose Show details to open the customer ledger entries that is not closed by the current customer.

Page Extension:


Notification and Action:

Customer Ledger Entries:

Test Video:

Using External link

Test Video:

In summary, notifications can be created in Business Central to notify the users some important information without blocking actions of the users.

Find out more about Notificationsfrom Microsoft Docs.


Hope this will help.




Copied title and URL