{"title":"ErrorInfo.AddNavigationAction([Text]) Method","url":"https://jonas-paprotka.de/docs/dev-itpro/developer/methods-auto/errorinfo/errorinfo-addnavigationaction-string-method/","by":"JOP-AL","license":"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.","credit":"Microsoft Corporation, CC BY 4.0","origin":"https://learn.microsoft.com/en-us/dynamics365/business-central/dev-itpro/developer/methods-auto/errorinfo/errorinfo-addnavigationaction-string-method","source":{"name":"Business Central developer and IT pro docs","repo":"https://github.com/MicrosoftDocs/dynamics365smb-devitpro-pb","commit":"828b6ee72fcd75755627cd6011f3d20899217ab2","date":"2026-11-19"},"checked":"2026-11-19","description":"Adds a navigation action for the error.","date":"2026-10-01","meta":{"topic":"reference"},"outline":[{"level":1,"title":"ErrorInfo.AddNavigationAction([Text]) Method","slug":"errorinfoaddnavigationactiontext-method","at":0,"chars":1430},{"level":2,"title":"Syntax","slug":"syntax","at":148,"chars":68},{"level":2,"title":"Parameters","slug":"parameters","at":216,"chars":300},{"level":2,"title":"Remarks","slug":"remarks","at":516,"chars":200},{"level":2,"title":"Example (set the AddNavigationAction property)","slug":"example-set-the-addnavigationaction-property","at":716,"chars":433},{"level":2,"title":"Related information","slug":"related-information","at":1149,"chars":281}],"text":"# ErrorInfo.AddNavigationAction([Text]) Method\n> Version: _Available or changed with runtime version 11.0._\nAdds a navigation action for the error.\n## Syntax\n```al\n ErrorInfo.AddNavigationAction([Caption: Text])\n```\n## Parameters\nErrorInfo\nType: errorinfo-data-type\nAn instance of the errorinfo-data-type data type.\n*[Optional] Caption*\nType: ../text/text-data-type\nThe 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.\n## Remarks\nYou 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.\n## Example (set the AddNavigationAction property)\n```al\n\nvar\n    MyErrorInfo: ErrorInfo;\n    TheCustomDimensions: Dictionary of [Text, Text];\nbegin\n    // setup the error info object: Define Message, DetailedMessage etc.\n\n    // setup show-it action(s) for the error info object\n    ChangeNotAllowedErrorInfo.PageNo(PAGE::\"MyPage\");\n    ChangeNotAllowedErrorInfo.AddNavigationAction('Some caption');\n\n    Error(MyErrorInfo);\nend\n```\n## Related information\nerrorinfo-data-type\n../../devenv-actionable-errors\nUser experience guidelines for errors<../../devenv-error-handling-guidelines>\n../../devenv-al-error-handling\nGetting Started with AL<../../devenv-get-started>\nDeveloping Extensions<../../devenv-dev-overview>"}