Have you ever been curious as to how those notifications popup when you change update sets or why when you change something in the applications table that the navigation menu refreshes. Well these events all happen through things called UI Notifications.
These notifications are a way for the system back end to update the front end without reloading the entire page.
So how do we create these notifications and leverage them, well first thing you need to create is a UI Script.
//Checking that the CustomEvent object exist
//This is not neccessary but is a good thing to have
//Add ui_notifications to the dom
//This will the name of the notifcation
var NOTIFICATION_NAME = "demo_notification";
//This is adding the event to the dom
//The first argument is a name
//The second argument is a function
"glide:ui_notification." + NOTIFICATION_NAME,
//This argument notification contains many things
//A good way to get data from this is using the
alert('This is what is stored in the attribute event:' + notification.getAttribute('event'));
The next script we need to create is a after business rule or a ui action.
var notification = new UINotification('demo_notification');
//You can set as many attribute as you need
notification.setAttribute('event', "Hello Demo World!!");
So this can be used on any table and you can add data from those records and use any of the available notification methods available on the client side to display that data.