How to find ApplObjectType() method of tree node class in ax 2012?

i am doing code upgrade from ax 2009 to ax 2012. During this upgrade i am getting an error

“Tree node class does not contain applObjectType() method.”

Method is present in ax 2009 TreeNode() class, but it is not present in Ax 2012 TreeNode() Class.

Is there any alternative method for applObjectType() in Ax2012? if yes what is that method?

use treeNode.TreeNodeType()

For implementation pattern have a look into \Classes\SysTableBrowser\treeNode2TableId(both in AX 2009 and AX 2012)

TreeNode.applObjectType() returns a UtilElementType in AX2009.

In AX2012 you can replace this with: TreeNode.utilElement().recordType