Friday, September 4, 2009

EXPORTOBJECTS

EXPORTOBJECTS Function

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.
  Remarks

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.

  Example

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.

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

No comments:

Post a Comment