In AX 2012, we had the ability to do something like this:
TreeNode _treeNode = TreeNode::findNode(@"\path\to\some\object");
var layerMask = _treeNode.applObjectLayerMask();
And it would get the layer(s) that the object existed and customized in, you could then use this to determine if the object was overlayered/customized.
Running this in D365FO though gives a different result, all objects now show as if they are coming from the sys layer regardless of the model they actually come from. I know the idea of 'layers' no longer exist in D365FO but is there a way to see what design time layer an objects exists?
My end goal in all of this would be a way to determine which objects are custom in the environment.