ErrorInfo.AddAction(Text, Integer, Text, Text) Method
Version: Available or changed with runtime version 12.0.
Specifies an action for the error.
Syntax
ErrorInfo.AddAction(Caption: Text, CodeunitID: Integer, MethodName: Text, Description: Text)
Parameters
ErrorInfo
Type: ErrorInfo
An instance of the ErrorInfo data type.
Caption
Type: Text
The text string that appears as the caption of the action in the error UI. The string can be a label that is enabled for multilanguage functionality.
CodeunitID
Type: Integer
The ID of the codeunit to run when the action is initiated from the error UI. The codeunit should contain at least one global method to be called by the error action. The global method must have an ErrorInfo data type parameter for accepting the ErrorInfo object.
MethodName
Type: Text
The name of the method in the codeunit, which is specified by the CodeunitID parameter, that you want to run for the action.
Description
Type: Text
The text that appears as the tooltip of the action in the error UI.
Remarks
The semantics of this method is the same as the version without a Description parameter. For more information, see AddAction(Text, Integer, Text).
Related information
ErrorInfo Data Type
Actionable errors
Error handling
Getting Started with AL
Developing Extensions