// TODO: Check & refactor this
// Get Tree
public static boolean addNode(Properties ctx, String treeType, int Record_ID, String trxName)
	{
		// TODO: Check & refactor this
		// Get Tree
		int AD_Tree_ID = 0;
		MClient client = MClient.get(ctx);
		I_AD_ClientInfo ci = client.getInfo();
		if (TREETYPE_Activity.equals(treeType))
			AD_Tree_ID = ci.getAD_Tree_Activity_ID();
		else if (TREETYPE_BoM.equals(treeType))
			throw new IllegalArgumentException("BoM Trees not supported");
		else if (TREETYPE_BPartner.equals(treeType))
			AD_Tree_ID = ci.getAD_Tree_BPartner_ID();
		else if (TREETYPE_Campaign.equals(treeType))
			AD_Tree_ID = ci.getAD_Tree_Campaign_ID();
		else if (TREETYPE_ElementValue.equals(treeType))
			throw new IllegalArgumentException("ElementValue cannot use this API");
		else if (TREETYPE_Menu.equals(treeType))
			AD_Tree_ID = ci.getAD_Tree_Menu_ID();
		else if (TREETYPE_Organization.equals(treeType))
			AD_Tree_ID = ci.getAD_Tree_Org_ID();
		else if (TREETYPE_Product.equals(treeType))
			AD_Tree_ID = ci.getAD_Tree_Product_ID();
		else if (TREETYPE_ProductCategory.equals(treeType))
			throw new IllegalArgumentException("Product Category Trees not supported");
		else if (TREETYPE_Project.equals(treeType))
			AD_Tree_ID = ci.getAD_Tree_Project_ID();
		else if (TREETYPE_SalesRegion.equals(treeType))
			AD_Tree_ID = ci.getAD_Tree_SalesRegion_ID();
		if (AD_Tree_ID == 0)
			throw new IllegalArgumentException("No Tree found");
		MTree_Base tree = MTree_Base.get(ctx, AD_Tree_ID, trxName);
		if (tree.get_ID() != AD_Tree_ID)
			throw new IllegalArgumentException("Tree found AD_Tree_ID=" + AD_Tree_ID);
		// Insert Tree in correct tree
		boolean saved = false;
		if (TREETYPE_Menu.equals(treeType))
		{
			MTree_NodeMM node = new MTree_NodeMM(tree, Record_ID);
			saved = node.save();
		}
		else if (TREETYPE_BPartner.equals(treeType))
		{
			MTree_NodeBP node = new MTree_NodeBP(tree, Record_ID);
			saved = node.save();
		}
		else if (TREETYPE_Product.equals(treeType))
		{
			MTree_NodePR node = new MTree_NodePR(tree, Record_ID);
			saved = node.save();
		}
		else
		{
			MTree_Node node = new MTree_Node(tree, Record_ID);
			saved = node.save();
		}
		return saved;
	}
public static boolean addNode(Properties ctx, String treeType, int Record_ID, String trxName)
{
// TODO: Check & refactor this
// Get Tree
int AD_Tree_ID = 0;
MClient client = MClient.get(ctx);
public static boolean addNode(Properties ctx, String treeType, int Record_ID, String trxName)
{
// TODO: Check & refactor this
// Get Tree
int AD_Tree_ID = 0;
MClient client = MClient.get(ctx);
I_AD_ClientInfo ci = client.getInfo();
if (TREETYPE_Activity.equals(treeType))
AD_Tree_ID = ci.getAD_Tree_Activity_ID();
else if (TREETYPE_BoM.equals(treeType))
throw new IllegalArgumentException("BoM Trees not supported");
else if (TREETYPE_BPartner.equals(treeType))
AD_Tree_ID = ci.getAD_Tree_BPartner_ID();
else if (TREETYPE_Campaign.equals(treeType))
public static boolean addNode(Properties ctx, String treeType, int Record_ID, String trxName)
{
// TODO: Check & refactor this
// Get Tree
int AD_Tree_ID = 0;
MClient client = MClient.get(ctx);
I_AD_ClientInfo ci = client.getInfo();
if (TREETYPE_Activity.equals(treeType))
AD_Tree_ID = ci.getAD_Tree_Activity_ID();
else if (TREETYPE_BoM.equals(treeType))
throw new IllegalArgumentException("BoM Trees not supported");
else if (TREETYPE_BPartner.equals(treeType))
AD_Tree_ID = ci.getAD_Tree_BPartner_ID();
else if (TREETYPE_Campaign.equals(treeType))
AD_Tree_ID = ci.getAD_Tree_Campaign_ID();
else if (TREETYPE_ElementValue.equals(treeType))
throw new IllegalArgumentException("ElementValue cannot use this API");
else if (TREETYPE_Menu.equals(treeType))
AD_Tree_ID = ci.getAD_Tree_Menu_ID();
else if (TREETYPE_Organization.equals(treeType))
AD_Tree_ID = ci.getAD_Tree_Org_ID();
else if (TREETYPE_Product.equals(treeType))
AD_Tree_ID = ci.getAD_Tree_Product_ID();
else if (TREETYPE_ProductCategory.equals(treeType))