{"title":"FileName Property","url":"https://jonas-paprotka.de/docs/dev-itpro/developer/properties/devenv-filename-property/","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/properties/devenv-filename-property, 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/properties/devenv-filename-property","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":"Sets the name of the external file to read data from or write data to an XmlPort.","date":"2026-10-01","meta":{"topic":"reference"},"outline":[{"level":2,"title":"Applies to","slug":"applies-to","at":142,"chars":24},{"level":2,"title":"Syntax","slug":"syntax","at":166,"chars":43},{"level":2,"title":"Remarks","slug":"remarks","at":209,"chars":871},{"level":2,"title":"Related information","slug":"related-information","at":1080,"chars":163}],"text":"> Version: _Available or changed with runtime version 1.0._\nSets the name of the external file to read data from or write data to an XmlPort.\n## Applies to\n Xml Port\n## Syntax\n```al\nFileName = 'File.txt';\n```\n## Remarks\nThe FileName property must be set to a valid file name or a run-time error occurs.\nThis property can be set dynamically by using the ../methods-auto/xmlport/xmlportinstance-filename-method. Using this method together with the Import method, you can create XMLports that are dynamic. This means that they can determine whether data is input or output at run time, and the name of the external file to read from or write to can also be set at run time.\nIf FileName is blank, then a default request options page tab will be created, where this property can be set at run time. If no name is specified or the devenv-userequestpage-property is set to false, then a run-time error occurs.\n> NOTE\n> In the Business Central Web client, because web browser restrictions, the file name cannot be set. Users will have to manually select the file when the XMLport is run.\n## Related information\n../methods-auto/xmlport/xmlportinstance-import-method\n../methods-auto/xmlport/xmlportinstance-filename-method\ndevenv-userequestpage-property"}