Version: Available or changed with runtime version 1.0.
Retrieves data that was passed to a notification instance as specified by a SETDATA method call.
Value := Notification.GetData(Name: Text)
The name of the data item that is specified by the SETDATA method call.
The data retrieved
You use the SetData Method (Notification) and GetData methods for transferring data in a notification. The methods are typically needed for handling actions on the notification. The SetData Method (Notification) method is called from the source of the notification, while the GetData method is called from the action code.
For more information and a detailed example, see Notifications.
The following code sets the data for a notification:
MyNotification.Message := 'This is a notification'; MyNotification.Scope := NotificationScope::LocalScope; MyNotification.SetData('Created',Format(CurrentDateTime,0,9)); MyNotification.SetData('ID',Format(CreateGUID,0,9)); MyNotification.AddAction('Action 1',CodeUnit::"Action Handler",'RunAction1'); MyNotification.AddAction('Action 2',CodeUnit::"Action Handler",'RunAction2'); MyNotification.Send;
The following code gets the data for a notification: