ErrorInfo.AddNavigationAction([Text]) Method

Version: Available or changed with runtime version 11.0.

Adds a navigation action for the error.

Syntax

 ErrorInfo.AddNavigationAction([Caption: Text])

Parameters

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

[Optional] 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.

Remarks

You use the AddNavigationAction property to implement a show-it action on the error dialog. For more information about how to develop actionable errors, see Actionable errors.

Example (set the AddNavigationAction property)


var 
    MyErrorInfo: ErrorInfo;
    TheCustomDimensions: Dictionary of [Text, Text];
begin
    // setup the error info object: Define Message, DetailedMessage etc.

    // setup show-it action(s) for the error info object
    ChangeNotAllowedErrorInfo.PageNo(PAGE::"MyPage");
    ChangeNotAllowedErrorInfo.AddNavigationAction('Some caption');

    Error(MyErrorInfo);
end

See Also

ErrorInfo Data Type
Actionable errors
User experience guidelines for errors
Error handling
Getting Started with AL
Developing Extensions