Falcon Space. Working with notices

Two types of notifications

  • asynchronous - by event. Are called in the code via mng.Notifications.CreateNotification. The function is passed the type of notification, from whom and to whom. 
  • synchronous - conditions are checked daily (in SQL) and events are created when running business logic for this type of notifications.

 

Example of a stored procedure

Storage name nt_[entity]_check[Event].Only @username is passed.
The query simply returns a certain result in any form, if there are strings, then a notification is created for the user's loyalist with the content of the query.

Calling a notification from sql

To create notifications from stored procedures, call the stored procedure as_nt_createNotification

  • from - the user who sent the notification.
  • to - the user to whom the notification was sent.
  • url-additional URL as part of the notification information
  • text-short notification text
  • typecode-notification code from the notificationTypes table
  • additional - additional information about the notification.

Note: 

1. You can also trigger an immediate notification when saving the form (see Calling external actions, for example via the Saveitem parameters for the form in SELECT 2). 
2. If it is possible to better call procedures via external actions 
3. If you need instant notification, use External actions. This will allow you to use the platform's funds to send push notifications.

Questions about notifications

How to make a custom layout for the notification bar at the top right

To do this, specify in the stored procedure [as_nt_getUserNotifications] в SELECT 2 in parameter CustomMakeup the required markup. In this case, SELECT 1 data will not be taken into account. This procedure is called on the page to request the number of unprocessed notifications.

It is appropriate to form the panel layout using an HTML block (with a procedure) and then use it in the CustomMakeup parameter.

Falcon Space is a functional web development platform on a narrow stack MS SQL/Bootstrap. Falcon Space Gettting started
Note