{"title":"NavApp.DeleteArchiveData(Integer) Method","url":"https://jonas-paprotka.de/docs/dev-itpro/developer/methods-auto/navapp/navapp-deletearchivedata-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/navapp/navapp-deletearchivedata-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/navapp/navapp-deletearchivedata-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":"Deletes the archived data for a specified table of an extension during installation.","date":"2026-10-01","meta":{"topic":"reference"},"outline":[{"level":1,"title":"NavApp.DeleteArchiveData(Integer) Method","slug":"navappdeletearchivedatainteger-method","at":0,"chars":1453},{"level":2,"title":"Syntax","slug":"syntax","at":343,"chars":64},{"level":2,"title":"Parameters","slug":"parameters","at":407,"chars":403},{"level":2,"title":"Remarks","slug":"remarks","at":810,"chars":509},{"level":2,"title":"Related information","slug":"related-information","at":1319,"chars":134}],"text":"# NavApp.DeleteArchiveData(Integer) Method\n> Version: _Available or changed with runtime version 1.0 until version 6.0 where it was deprecated for the following reason: \"The features related to data migration from V1 to V2 extensions are being deprecated.\"_\nDeletes the archived data for a specified table of an extension during installation.\n## Syntax\n```al\n NavApp.DeleteArchiveData(TableNo: Integer)\n```\n## Parameters\nTableNo\nType: ../integer/integer-data-type\nThe ID of the table for which to delete archived data.\nIf you omit this optional return value and if archived data cannot be deleted for the specified table, then a run-time error occurs. If you include a return value, then it is assumed that you will handle any errors and no run-time error occurs, even though the archived data is not deleted.\n## Remarks\nYou use this method as part of the upgrade code for an extension, where it is called from the `OnNavAppUpgradePerDatabase()` or `OnNavAppUpgradePerCompany()` system methods. When an extension is uninstalled, the data in application tables of the extension is automatically stored into a set of special tables so that the data is still preserved. With the DeleteARCHIVEDATA method, you can delete the archived data from the application table of the new version of an extension when it is installed.\n## Related information\nnavapp-data-type\nGet Started with AL<../../devenv-get-started>\nDeveloping Extensions<../../devenv-dev-overview>"}