Saturday, August 8, 2015

Export Dynamics AX project from Code

Doing a backup for code can be done in many ways for Dynamics AX, one of it is using the xpo backup.
Below is the sample code to export the Project from x++:

static void ExportProject(Args _args)
    TreeNode            treeNode;
    ProjectNode         projectNode;
    ProjectListNode     projectListNode;
    TreeNodeIterator    it;

    projectListNode = infolog.projectRootNode().AOTfindChild("Shared");
    it = projectListNode.AOTiterator();
    projectNode = projectListNode.AOTfindChild("ALL_CUS");
    treeNode = projectNode;