Please enable JavaScript to view this site.

Navigation: Advanced topics > Programming topics > Notification API

About Notification API

Scroll Prev Next More

 

To enable Notification API, proceed to Miscellaneous screen, click 'Notification API' button, enable this feature and create a new table to store notifications. Now, since this is an API, we need to write some code to make it work. Let's start with something simple.

 

When someone adds a new record to the Categories table we also want to create a notification.For this purpose, we will add the following code to the Categories table AfterAdd event:

 

 

CommonFunctions.addNotification( "New category added: " + values["CategoryName"].ToString() , "New category", "fa-envelope",
CommonFunctions.makePageLink( "categories", "view", keys) );  

 

 

If everything worked as expected, we will see a new notification added after each new record in the Categories table. And if we click on any notification, it will take us to that new category view page.

 

scr_notifications

 

Methods

Method

Description

addNotification

Add a new notification

createNotification

Alternative syntax