standard.createNotification
Creates a new local notification to be displayed on the host system of the front end.
Syntax
ui.Interface.frontCall("standard", "createNotification",
[options], [id] )
- options - A
RECORDcontaining options to create the notification, where members are:- id
INTEGER- WhenNULLor when providing a unexisting id, the front call creates a new notification. Otherwise, if the notification id exists already, the call will produce an error. - title
STRING- Defines the title of the notification. - content
STRING- Defines the body / text of the notification. - icon
STRING- Defines the icon of the notification.
- id
- id - is an
INTEGERvariable receiving the unique notification id returned by the frontcall. ReturnsNULLif notification cannot be processed on the front-end device.
Usage
The "createNotification" front call creates a new local notification.
The options parameter must be a record defined as follows:
DEFINE options RECORD
id INTEGER,
title STRING,
content STRING,
icon STRING
END RECORDThe id member must be NULL or must be an unexisting
identifier for this front end session. Otherwise, if the notification identifier exists already, the
call will produce an error.
If the user selects a notification on the front-end device, the predefined
"notificationselected" action will be sent to the current dialog instruction. For
more details, see standard.getLastNotiticationInteractions.
In order to clear local notifications, use the standard.clearNotifications front call.
Example
DEFINE options RECORD
id INTEGER,
title STRING,
content STRING,
icon STRING
END RECORD
LET options.id = NULL
LET options.title = "Arrival"
LET options.content = "Shipment arrived"
CALL ui.Interface.frontCall("standard","createNotification",[options],[options.id])
DISPLAY "Returned notification id: ", options.id