{"title":"ErrorInfo.TableId([Integer]) Method","url":"https://jonas-paprotka.de/docs/dev-itpro/developer/methods-auto/errorinfo/errorinfo-tableid-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-tableid-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-tableid-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":"Specifies the table ID that the error relates to.","date":"2026-10-01","meta":{"topic":"reference"},"outline":[{"level":1,"title":"ErrorInfo.TableId([Integer]) Method","slug":"errorinfotableidinteger-method","at":0,"chars":2070},{"level":2,"title":"Syntax","slug":"syntax","at":148,"chars":139},{"level":2,"title":"Parameters","slug":"parameters","at":287,"chars":186},{"level":2,"title":"Return Value","slug":"return-value","at":473,"chars":111},{"level":2,"title":"Remark","slug":"remark","at":584,"chars":440},{"level":2,"title":"Example (get the TableId property)","slug":"example-get-the-tableid-property","at":1024,"chars":254},{"level":2,"title":"Example (set the TableId property)","slug":"example-set-the-tableid-property","at":1278,"chars":544},{"level":2,"title":"Related information","slug":"related-information","at":1822,"chars":248}],"text":"# ErrorInfo.TableId([Integer]) Method\n> Version: _Available or changed with runtime version 8.0._\nSpecifies the table ID that the error relates to.\n## Syntax\n```al\n[TableId := ]  ErrorInfo.TableId([TableId: Integer])\n```\n> NOTE\n> This method can be invoked using property access syntax.\n## Parameters\nErrorInfo\nType: errorinfo-data-type\nAn instance of the errorinfo-data-type data type.\n*[Optional] TableId*\nType: ../integer/integer-data-type\nThe table ID of the ErrorInfo\n## Return Value\n*[Optional] TableId*\nType: ../integer/integer-data-type\nThe current table ID of the ErrorInfo.\n## Remark\nYou can use the TableId property to transfer data from the code where an error message is shown to the user to the codeunit and method(s) executed by fix-it/show-it actions or where you handle collected errors.\nFor more information about how to develop actionable errors, see ../../devenv-actionable-errors.\nFor more information about how to handle multiple collected errors, see Collecting errors<../../devenv-error-collection>.\n## Example (get the TableId property)\n```al\nprocedure myErrorHandlerProc(MyErrorInfo: ErrorInfo)\nvar\n    TheTableId: Integer;\nbegin\n    TheTableId := MyErrorInfo.TableId();\n\n    // do something with the data (now we now the table ID for the row)\nend\n```\n## Example (set the TableId property)\n```al\n\nvar\n    MyErrorInfo: ErrorInfo;\n    MyTableRec: Record \"MyTable\";\nbegin\n    // setup the error info object: Define Message, DetailedMessage etc.\n\n    // set identifiers for the fix-it action codeunit (or for the AL runtime in case of a show-it action)\n    MyErrorInfo.RecordId := MyTableRec.RecordId;\n    MyErrorInfo.SystemId := MyTableRec.SystemId;\n    MyErrorInfo.TableId := Database::\"MyTable\";\n\n    // setup fix-it or show-it action(s) for the error info object\n\n    Error(MyErrorInfo);\nend\n```\n## Related information\nerrorinfo-data-type\n../../devenv-actionable-errors\nCollecting Errors<../../devenv-error-collection>\n../../devenv-al-error-handling\nGet Started with AL<../../devenv-get-started>\nDeveloping Extensions<../../devenv-dev-overview>"}