Leader Board

How to: Import Application Objects

Only users with developer rights can import code.

  1. To import application objects:

  2. Open the Application Object Tree (AOT).

  3. Click Microsoft Dynamics AX menu > Import > Command.

  4. In the Import dialog box, click Browse to locate the file to import and open it. The file name list holds the five most recently used export file names.

    If an import file contains labels, the modes that can be selected for importing labels are:

    • Only application objects – Activates all options except Create labels in the label file option.

    • Application objects and labels – Activates all options.

    • Only labels – Activates only the Create labels in the label file option.

    Initially, all objects in the tree are selected for import. To clear individual objects, open the tree by checking the Show details check box. Expand the branches in the tree and clear the check box next to the object you want to exclude from the import. When a top node is selected, all subnodes are also included. The names of objects that already exist in the AOT appear in bold font in the import tree. Note that objects are always imported into the current application object layer. The Compare command is helpful in deciding whether you want import a particular application object.

  5. Click OK to perform the import with the selected options.

    When you click OK, a warning appears if one or more objects already exist in the AOT. You can choose to evaluate each individual object, or click Yes to all/No to all.

    NoteNote

    If you are importing a table containing display methods in a field group, the field group might contain an invalid reference to the method after import. If you import the table a second time, the problem is solved.

Delete Table and Class Members


This check box affects only application objects of types table and class. For other application object types, the check box is always implicitly selected and the types are always overwritten.

When the check box is not selected, the import overwrites existing members. If the application object in the AOT has more members, for example, additional methods, these methods are untouched.

When the check box is selected, the import overwrites existing members and deletes members in the AOT that are not present in the import file.

The overwrite check box affects these member types:

  • Tables – for fields, field groups, indexes, relations and methods

  • Classes – for methods

NoteNote

You always import objects into the current application object layer.

Delete Table and Class Members: A Simple Example

In this example you are importing a class named MyClass with the methods called A, B, and C.

In the Application Object Tree (AOT), MyClass has the methods A, B, C, D, and E.

  • If you select Overwrite table and class members, MyClass in the AOT only has the methods A, B, and C after the import where methods A, B, and C have been overwritten with the ones from the import file.

  • If you do not select Overwrite table and class members, MyClass in the AOT still has the methods A, B, C, D, and E after the import. Methods A, B, and C have been overwritten with the ones from the import file.

No comments:

Post a Comment