After designing an XMLport, you can either create a codeunit to run the XMLport or run it from Object Designer. XMLports can be designed to export or import data. XMLports can also be designed for both export and import. This topic shows you how to run XMLports from Object Designer. For information about how to design an XMLport, see How to: Design XMLports. For information about how to run an XMLport from codeunit, see How to: Create Codeunits to Run XMLports.
To run an XMLport from Object Designer
-
In the Microsoft Dynamics NAV Development Environment, on the Tools menu, choose Object Designer.
-
In Object Designer, choose XMLport, choose the XMLport you want to run, and then choose the Run button. The Edit-<XMLport Name> request page opens in Microsoft Dynamics NAV.
-
If the XMLport you want to run is designed to both import and export data, then do the following:
- On the Edit-<XMLport Name> request page, in the
Direction drop-down list, select the direction you want and
then choose the OK button. The direction drop-down list box
is located at the bottom of the page. You can specify how you want
to sort the data and the filtering criteria on the
Edit-<XMLport Name> request page.
For information about the XMLport request page, see Request Pages (XMLPorts). - If you select Export, then do the following:
- In the Export File dialog box, choose the Save
button to open the Export window.
- In the Export window, browse to the location on your
computer where you want to save the file that you are
exporting.
- In the File name text box, enter a name for the file. By
default, the name of the XMLport is used as the name of the
file.
- In the Save as type drop-down list box, choose the file
format you want, and then choose the Save button to export
the data from the database. Instead of saving the file, you can
choose the Open button from the Export File dialog
box to view the file.
Note If you save the file and you do not specify a name, the file will be saved in the format that is specified in the Format Property (XMLports).
- In the Export File dialog box, choose the Save
button to open the Export window.
- If you select Import, then do the following:
- In the Import window, browse to the location on your
computer where the file that you want to import is
located.
- Choose the file and then choose the Open button to
import the file to the database.
- In the Import window, browse to the location on your
computer where the file that you want to import is
located.
Note For XMLports that are designed to both import and export data, the Edit-<XMLport Name> page that is displayed differs from the Edit-<XMLport Name> page that is displayed for either import or export. - On the Edit-<XMLport Name> request page, in the
Direction drop-down list, select the direction you want and
then choose the OK button. The direction drop-down list box
is located at the bottom of the page. You can specify how you want
to sort the data and the filtering criteria on the
Edit-<XMLport Name> request page.
-
If the XMLport only exports data, do the following:
- On the Edit-<XMLport Name> page, choose the
OK button. The Export File dialog box is
displayed.
- In the Export File dialog box, choose the Save
button to open the Export window.
- In the Export window, browse to the location on your
computer where you want to save the file that you are
exporting.
- In the File name text box, enter a name for the file. By
default, the name of the XMLport is used as the name of the
file.
- In the Save as type drop-down list box, choose the file
format you want, and then choose the Save button to export
the data from the database. Instead of saving the file, you can
choose the Open button from the Export File dialog
box to view the file.
Note If you save the file and you do not specify a name, the file will be saved in the format that is specified in the Format Property (XMLports).
- On the Edit-<XMLport Name> page, choose the
OK button. The Export File dialog box is
displayed.
-
If the XMLport only imports data, do the following:
- On the Edit-XMLport Name page, choose the OK
button. The Import window is displayed.
- In the Import window, browse to the location on your
computer where the file that you want to import is
located.
- Choose the file and then choose the Open button to
import the file to the database.
- On the Edit-XMLport Name page, choose the OK
button. The Import window is displayed.