Muokkaa

Jaa


Notification.Id([Guid]) Method

Version: Available or changed with runtime version 1.0.

Specifies the identifier for a notification.

Syntax

[Id := ]  Notification.Id([Id: Guid])

Note

This method can be invoked using property access syntax.

Parameters

Notification
 Type: Notification
An instance of the Notification data type.

[Optional] Id
 Type: Guid

Return Value

[Optional] Id
 Type: Guid

Remarks

If left unassigned the notification will be assigned an ID when the Send method is called. For more information, see Send Method (Notification).

Example

The following code creates a notification and sends it if NewBalance is greater than the credit limit. If it is lower than the credit limit, it recalls the notification.

The example uses a pre-defined ID so that the notification can be recalled.

MyNotification.ID := '00000000-0000-0000-0000-000000000001';
IF NewBallance > Rec. "Credit Limit" THEN begin
  MyNotification.Message := 'The customer's current balance exceeds their credit limit.';
  MyNotification.Scope := NotificationScope::LocalScope;
  MyNotification.AddAction('Fix it.', 50001, 'FixCustomerCreditLimit');
  MyNotification.SetData('CustomerNo.', Rec."No.");
  MyNotification.Send;
END ELSE
  MyNotification.Recall;

Notification Data Type
Get Started with AL
Developing Extensions