Exports one or more objects to either a text file or an .xml file.
EXPORTOBJECTS(FileName, ObjectTableRecord[, Format])
The path and name of the file to which you export objects.
Specifies a record in the Object table, which is table 2000000001. You can set filters on this record so that the exported objects are also filtered. For more information, see.
The type of the file to which you export objects. The valid values are 0 and 1. If you specify 0, then the data is exported in text format. If you specify 1, then the data is exported in XML format. The default value is 0.
This function is not supported on Microsoft Dynamics NAV Server.
This function achieves the same result as the Export item on the File menu in the Classic client.
Exporting to an .xml file is only supported for form or page objects.
For more information about file handling best practices, see.
This example filters all reports in the range 50000 to 60000 and then exports the filtered set of reports to a text file. This example requires that you create the following variable.
MyFilter.SETFILTER(MyFilter.Type,'=Report'); MyFilter.SETFILTER(MyFilter.ID,'%1..%2',50000,60000); EXPORTOBJECTS('C:\MyExport.txt', MyFilter, 0);