{"title":"Database.ExportData(Boolean, var Text [, Text] [, Boolean] [, Boolean] [, Boolean] [, Record]) Method","url":"https://jonas-paprotka.de/docs/dev-itpro/developer/methods-auto/database/database-exportdata-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/database/database-exportdata-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/database/database-exportdata-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":"Exports data from the database to a file.","date":"2026-10-01","meta":{"topic":"reference"},"outline":[{"level":1,"title":"Database.ExportData(Boolean, var Text [, Text] [, Boolean] [, Boolean] [, Boolean] [, Record]) Method","slug":"databaseexportdataboolean-var-text-text-boolean-boolean-boolean-record-method","at":0,"chars":2206},{"level":2,"title":"Syntax","slug":"syntax","at":321,"chars":313},{"level":2,"title":"Parameters","slug":"parameters","at":634,"chars":1198},{"level":2,"title":"Return Value","slug":"return-value","at":1832,"chars":238},{"level":2,"title":"Related information","slug":"related-information","at":2070,"chars":136}],"text":"# Database.ExportData(Boolean, var Text [, Text] [, Boolean] [, Boolean] [, Boolean] [, Record]) Method\n> Version: _Available or changed with runtime version 1.0._\nExports data from the database to a file. The data is not deleted from the database.\n> NOTE\n> This method is supported only in Business Central on-premises.\n## Syntax\n```al\n[Ok := ]  Database.ExportData(ShowDialog: Boolean, var FileName: Text [, Description: Text] [, IncludeApplication: Boolean] [, IncludeApplicationData: Boolean] [, IncludeGlobalData: Boolean] [, CompanyRecord: Record])\n```\n> NOTE\n> This method can be invoked without specifying the data type name.\n## Parameters\nShowDialog\nType: ../boolean/boolean-data-type\nSpecifies if you want to display a dialog box where the user can confirm the action.\nFileName\nType: ../text/text-data-type\nSpecifies the name and location of the file that the data must be exported to. The file must have the .navdata extension.\n*[Optional] Description*\nType: ../text/text-data-type\nSpecifies a description for the exported data.\n*[Optional] IncludeApplication*\nType: ../boolean/boolean-data-type\nSpecifies if you want to export the application objects. Create a variable of type Boolean to specify this parameter.\n*[Optional] IncludeApplicationData*\nType: ../boolean/boolean-data-type\nSpecifies if you want to export the data that defines the application in the database. This includes the permissions, permission sets, profiles, and style sheets. Create a variable of type Boolean to specify this parameter.\n*[Optional] IncludeGlobalData*\nType: ../boolean/boolean-data-type\nSpecifies if you want to export global, non-company specific data. Create a variable of type Boolean to specify this parameter.\n*[Optional] CompanyRecord*\nType: ../record/record-data-type\nSpecifies the company or companies that must be imported.\n## Return Value\n*[Optional] Ok*\nType: ../boolean/boolean-data-type\ntrue if the operation was successful; otherwise false. If you omit this optional return value and the operation does not execute successfully, a runtime error will occur.\n## Related information\ndatabase-data-type\nGet Started with AL<../../devenv-get-started>\nDeveloping Extensions<../../devenv-dev-overview>"}