How to get Table modified date time in X++

Hello,

i need to get modified date time of a table in D365 by x++,

i understand its possible only for those tables which have modified date time enabled,

my code is below:

  1. i tried two ways, first is xUtilElements

  2. second one i tried was to find modified date time as a property on AxTable object, both ways failed, any suggestion how to get table modified date by x++ ???

// tableModified is an NoYes Enum
// tableObject is an AxTable from Microsoft.Dynamics.Ax.Xpp.MetadataSupport

        if (tableModified)
        {
            if(tableObject.ModifiedDateTime)
            {
                tableNode = TreeNode::findNode('\\Data Dictionary\\Tables\\' + tableObject.Name);

                utilElements = xUtilElements::findTreeNode(tableNode);

                conForExport    = conPoke(conForExport, conLen(conForExport)+1, utilElements.ModifiedDateTime);
            }
        }
        else
        {
            conForExport    = conIns(conForExport, conLen(conForExport)+1, '');
        }

Your code suggests that you want to know when metadata or code of a table was modified, but such information isn’t deployed to the ERP system. If you’re talking about your own changes, you’ll find the infomation in your version control system (Azure DevOps).