Tuesday, August 28, 2012

Ax 2012 TableWithValidTimeStateFieldPropery


 


static void HKS_JobTableWithValidTimeStateField(Args _args)
{
    #AOT
    #properties
    TreeNodeIterator  treeNodeIterator;
    TreeNode             contextNode;
    str                        prop;
    int                        i;

    treeNodeIterator = TreeNode::findNode(#TablesPath).AOTiterator();
    contextNode = treeNodeIterator.next();
    while(contextNode)
    {
        contextNode = treeNodeIterator.next();
        prop =contextNode.AOTgetProperty(#PropertyValidTimeStateFieldType);
        if ( prop == enum2str(ValidTimeStateFieldType::Date) ||
            prop == enum2str(ValidTimeStateFieldType::UtcDateTime) )
        {
            info(contextNode.AOTname());
        }
    }
}