SysAutoRun.execDataImport Method [AX 2012]
Imports data from a .dat file into a company account.
Syntax
protected boolean execDataImport(XmlNode _command)
Run On
Client
Parameters
- _command
Type: XmlNode Class
The XML node to get the value from.
Return Value
Type: boolean
true if execution is successful; otherwise, false.
Remarks
The execDataImport method is called when the <DataImport> tag is used in the configuration file when Microsoft Dynamics AX is started. For more information, see the SysAutoRun class.
Execution of this method is controlled by the SysAutoRun.execCommand method.
The <DataImport> tag has the following attributes:
companyId, specifies the company account that data should be imported into.
file, specifies the name and path of the file that data should be imported from.
Note
There must also be an equivalent .def file in its folder.
includeSystemTables, determines whether the data import includes system and shared tables. These tables are not included. To include them, set the includeSystemTables attribute to true.
definitionGroupId, specifies an existing definition group to use when importing data, such as definitionGroupId="STD".
Examples
The following example shows a possible use of the <DataImport> tag in the configuration file.
<DataImport companyId="fc" includeSystemTables="true"
file="d:\data\demodata.dat" />