{"title":"ErrorInfo.Collectible([Boolean]) Method","url":"https://jonas-paprotka.de/docs/dev-itpro/developer/methods-auto/errorinfo/errorinfo-collectible-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-collectible-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-collectible-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 if the error is collectible using ErrorBehavior.Collect.","date":"2026-10-01","meta":{"topic":"reference"},"outline":[{"level":1,"title":"ErrorInfo.Collectible([Boolean]) Method","slug":"errorinfocollectibleboolean-method","at":0,"chars":1345},{"level":2,"title":"Syntax","slug":"syntax","at":169,"chars":151},{"level":2,"title":"Parameters","slug":"parameters","at":320,"chars":193},{"level":2,"title":"Return Value","slug":"return-value","at":513,"chars":118},{"level":2,"title":"Example (get the Collectible property)","slug":"example-get-the-collectible-property","at":631,"chars":228},{"level":2,"title":"Example (set the Collectible property)","slug":"example-set-the-collectible-property","at":859,"chars":269},{"level":2,"title":"Related information","slug":"related-information","at":1128,"chars":217}],"text":"# ErrorInfo.Collectible([Boolean]) Method\n> Version: _Available or changed with runtime version 8.0._\nSpecifies if the error is collectible using ErrorBehavior.Collect.\n## Syntax\n```al\n[Collectible := ]  ErrorInfo.Collectible([Collectible: Boolean])\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] Collectible*\nType: ../boolean/boolean-data-type\nThe collectible of the ErrorInfo\n## Return Value\n*[Optional] Collectible*\nType: ../boolean/boolean-data-type\nThe current collectible of the ErrorInfo.\n## Example (get the Collectible property)\n```al\nprocedure myErrorHandlerProc( MyErrorInfo: ErrorInfo )\nvar\n    IsErrorCollectible: Boolean;\nbegin\n    IsErrorCollectible := MyErrorInfo.Collectible();\n\n    // do something\nend\n```\n## Example (set the Collectible property)\n```al\nvar\n    MyErrorInfo: ErrorInfo;\nbegin\n    // setup the error info object: Define Message, DetailedMessage etc.\n\n    // set MyErrorInfo to be collectible\n    MyErrorInfo.Collectible(true);\n\n    Error(MyErrorInfo);\nend\n```\n## Related information\nerrorinfo-data-type\nCollecting Errors<../../devenv-error-collection>\n../../devenv-al-error-handling\nGet Started with AL<../../devenv-get-started>\nDeveloping Extensions<../../devenv-dev-overview>"}