Friday, April 24, 2009

List of modified AOT objects

You are in an upgrade process. You browse the AOT to check for modified elements. Sometimes it's easy to spot them (bold typeface, marked USR), but sometimes it's not (they seem to belong to the SYS-layer, but when expanded they reveal themselves as belonging to another layer).

This short script will give you a list of all "touched" objects.

static void CheckLayer(Args _args)
{ TreeNode TreeNode;
TreeNode BaseTreeNode;
UtilEntryLevel UtilEntryLevel;
#AOT
;
BaseTreeNode = TreeNode::findNode(#TablesPath);

TreeNode = BaseTreeNode.AOTfirstChild();

while(TreeNode)
{
UtilEntryLevel=treeNode.applObjectLayer();
if((UtilEntryLevel==UtilEntryLevel::usr) (UtilEntryLevel==UtilEntryLevel::var))
{
info(strfmt("Object %1 - layer %2",TreeNode.AOTname(),enum2str(UtilEntryLevel)));
}
TreeNode=TreeNode.AOTnextSibling();
}
}

This script gives you all the tables modified in either the VAR or USR layer.
Replace the #TablesPath macro name as needed, to get EDT, classes, forms, ...

Dynamics Ax provides some nice upgrade tools, but sometimes the "manual" approach is needed.

Kind regards,

Willy

3 comments:

  1. thanks this is great, it works for all utilelements except forms!
    any ideas?

    ReplyDelete
    Replies
    1. Simple, try it by replacing the code as

      BaseTreeNode = TreeNode::findNode(#FormsPath);

      Delete
  2. Erp education institute is the main organization providing oracle fusion procurement education internationally for extra records
    Thanks regard
    oracle fusion procurement online training
    oracle fusion procurement training

    ReplyDelete