# ErrorInfo.AddNavigationAction([Text]) Method
> Version: _Available or changed with runtime version 11.0._
Adds a navigation action for the error.
## Syntax
```al
 ErrorInfo.AddNavigationAction([Caption: Text])
```
## Parameters
ErrorInfo
Type: errorinfo-data-type
An instance of the errorinfo-data-type data type.
*[Optional] Caption*
Type: ../text/text-data-type
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 ../../devenv-actionable-errors.
## Example (set the AddNavigationAction property)
```al

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
```
## Related information
errorinfo-data-type
../../devenv-actionable-errors
User experience guidelines for errors<../../devenv-error-handling-guidelines>
../../devenv-al-error-handling
Getting Started with AL<../../devenv-get-started>
Developing Extensions<../../devenv-dev-overview>

Copyright (c) Microsoft Corporation. CC BY 4.0, https://creativecommons.org/licenses/by/4.0/; code samples MIT. From https://learn.microsoft.com/en-us/dynamics365/business-central/dev-itpro/developer/methods-auto/errorinfo/errorinfo-addnavigationaction-string-method, MicrosoftDocs/dynamics365smb-devitpro-pb at 828b6ee (2026-11-19). Changed: includes filled in, links to this site, and for agents shortened without dropping a fact. https://jonas-paprotka.de/docs/dev-itpro/developer/methods-auto/errorinfo/errorinfo-addnavigationaction-string-method/
