Here you can find the X++ code to get complete item Category hierarchy using X++ in Ax
Static void main(Args args)
{
ItemId itemId = "MT0001";
EcoResProductCategory EcoResProductCategory;
EcoResCategory EcoResCategory,EcoResCategoryNext;
EcoResCategoryId parentCategory;
List li = new List(Types::String);
ListEnumerator enumer;
{
ItemId itemId = "MT0001";
EcoResProductCategory EcoResProductCategory;
EcoResCategory EcoResCategory,EcoResCategoryNext;
EcoResCategoryId parentCategory;
List li = new List(Types::String);
ListEnumerator enumer;
select * from EcoResCategory
join RecId from EcoResProductCategory
where EcoResCategory.RecId == EcoResProductCategory.Category
&& EcoResProductCategory.Product == InventTable::find(itemId).Product;
parentCategory = EcoResCategory.ParentCategory;
li.addStart(EcoResCategory.Name);
while (parentCategory)
{
select * from EcoResCategory
where EcoResCategory.RecId == parentCategory;
//&& EcoResCategory.ParentCategory != 0;
parentCategory = EcoResCategory.ParentCategory;
li.addStart(EcoResCategory.Name);
}
enumer = li.getEnumerator();
while (enumer.moveNext())
{
info(enumer.current());
}
}
Merit Casino » Bitcoin Casino and Play at the best - Deccasino
ReplyDeleteThe online casino offers all the most popular kadangpintar games for worrione real money, from progressive slots to live 메리트카지노 dealer games and progressive jackpots.