{"title":"Xmlport.Run(Integer [, Boolean] [, Boolean] [, var Record]) Method","url":"https://jonas-paprotka.de/docs/dev-itpro/developer/methods-auto/xmlport/xmlport-run-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/xmlport/xmlport-run-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/xmlport/xmlport-run-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":"Loads and executes the XmlPort that you specify.","date":"2026-10-01","meta":{"topic":"reference"},"outline":[{"level":1,"title":"Xmlport.Run(Integer [, Boolean] [, Boolean] [, var Record]) Method","slug":"xmlportruninteger-boolean-boolean-var-record-method","at":0,"chars":2087},{"level":2,"title":"Syntax","slug":"syntax","at":178,"chars":120},{"level":2,"title":"Parameters","slug":"parameters","at":298,"chars":1654},{"level":2,"title":"Related information","slug":"related-information","at":1952,"chars":135}],"text":"# Xmlport.Run(Integer [, Boolean] [, Boolean] [, var Record]) Method\n> Version: _Available or changed with runtime version 1.0._\nLoads and executes the XmlPort that you specify.\n## Syntax\n```al\n Xmlport.Run(Number: Integer [, RequestWindow: Boolean] [, Import: Boolean] [, var Record: Record])\n```\n## Parameters\nNumber\nType: ../integer/integer-data-type\nSpecifies the XmlPort to run.\n*[Optional] RequestWindow*\nType: ../boolean/boolean-data-type\nSpecify true to show request page; specify false to run the report and skip the request page. This parameter overrides the setting of the UseRequestPage Property of the XMLPort. If you do not provide a value for the RequestWindow parameter, then the setting of the UseRequestPage property is used. \\> Web client does not support request pages with XmlPorts. If the XMLPort will appear in the web client, you should set the value to false; otherwise, you will get an error at runtime.\n*[Optional] Import*\nType: ../boolean/boolean-data-type\nSpecifies whether the XMLPort imports or exports data. Specify true to run the XmlPort and import data; specify false to export data.This parameter is most relevant when the XmlPort does not use a request page and the Direction Property of the XmlPort is set to Both. In this instance, you use the parameter to specify the direction of the data. If the XmlPort uses a request page, then a direction option appears on the request page that enables the user can choose to import or export data. The Import parameter specifies the default value in the direction on option on the request page. If the Direction property is set to Import or Export, then you must set this parameter to match the direction that is set by the Direction property; otherwise, you will get an error at runtime. The default is true.\n*[Optional] Record*\nType: ../record/record-data-type\nThe record to use in the XmlPort. The system will use any filters that are attached to the specified record.\n## Related information\nxmlport-data-type\nGet Started with AL<../../devenv-get-started>\nDeveloping Extensions<../../devenv-dev-overview>"}