Notification.Recall() Method

Version: Available or changed with runtime version 1.0.

Recall a sent notification.

Syntax

[Ok := ]  Notification.Recall()

Parameters

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

Return Value

[Optional] Ok
 Type: Boolean
true if it succeeds in sending a recall request to the client; otherwise false. The same notification can be recalled more than once, without failing. Also, a notification can be recalled successfully even if it hasn't been sent. If you omit this optional return value and the operation does not execute successfully, a runtime error will occur.

Remarks

A typical reason that the RECALL method returns false is a failure in the communication with the client. Another reason could be that the code tries to recall a notification for which there is no instance.

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.

MyNotification.ID := '00000000-0000-0000-0000-000000000001';
IF NewBalance > 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