Export (0) Print
Expand All

EXPORTOBJECTS Function (Codeunit, Dataport, Form, MenuSuite, Page, Report, Table, XMLport)

Microsoft Dynamics Nav 2009

Exports one or more objects to either a text file or an .xml file.


EXPORTOBJECTS(FileName, ObjectTableRecord[, Format])

Parameters

FileName

Type: Text

The path and name of the file to which you export objects.

ObjectTableRecord

Type: Record

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 SETFILTER Function (Record).

Format

Type: Integer

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 is not supported on Microsoft Dynamics NAV Application 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 File Handling.

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.

Variable Data type Subtype

MyFilter

Record

Object

MyFilter.SETFILTER(MyFilter.Type,'=Report');
MyFilter.SETFILTER(MyFilter.ID,'%1..%2',50000,60000);
EXPORTOBJECTS('C:\MyExport.txt', MyFilter, 0);

Community Additions

ADD
Show:
© 2014 Microsoft