# Xmlport.Run(Integer [, Boolean] [, Boolean] [, var Record]) Method
> Version: _Available or changed with runtime version 1.0._
Loads and executes the XmlPort that you specify.
## Syntax
```al
 Xmlport.Run(Number: Integer [, RequestWindow: Boolean] [, Import: Boolean] [, var Record: Record])
```
## Parameters
Number
Type: ../integer/integer-data-type
Specifies the XmlPort to run.
*[Optional] RequestWindow*
Type: ../boolean/boolean-data-type
Specify 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.
*[Optional] Import*
Type: ../boolean/boolean-data-type
Specifies 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.
*[Optional] Record*
Type: ../record/record-data-type
The record to use in the XmlPort. The system will use any filters that are attached to the specified record.
## Related information
xmlport-data-type
Get Started with AL<../../devenv-get-started>
Developing Extensions<../../devenv-dev-overview>

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. https://jonas-paprotka.de/docs/dev-itpro/developer/methods-auto/xmlport/xmlport-run-method/
