BC notifications

How to Create Notifications in BC

What is a notification? Notifications are non-intrusive information that users may access to learn more about a current situation without being interrupted or forced to take immediate action. You may, for instance, have a message that a customer’s credit limit has been surpassed, that there aren’t enough items in inventory, that a bill is past due, etc.

An excellent non-intrusive method of informing the user is through notification. Simple notification is quite simple to perform.

The available techniques are shown in the following table.

Method Description
Message Specifies the content of the notification that appears in the UI.
Scope Specifies the scope in which the notification appears.
Send Sends the notification to be displayed by the client.
AddAction Adds an action on the notification.
SetData Sets a data property value for the notification
GetData Gets a data property value from the notification.
Recall Recalls a sent notification.

Now, let’s try making a few samples.


Sample 1


Create notification to inform user that Vendor Invoice No. is empty.

If Vendor Invoice No. is empty the users get a notification.


Sample 2


Create a notification to inform the user if the Item Reference is empty and add action to update that Item

It’s a little difficult to add an action. You will need to create a new codeunit, then use SetRange to pass the parameter.

The example below demonstrates how SetRange is used to pass the Item No.


When we open a certain item we get notification that show us Item Reference is empty and we get action on the notification for update Item Reference.


When we click on that action the codeunit will run and Item Reference will open and we can fill the fields.


Share on facebook
Share on twitter
Share on linkedin