Sunday, July 3, 2016

Catgeory Based on product Number ax 2012

//Catgeory Based on product Number
private str category(ItemId itemId)
{
    InventTable inventtable;
  //  EcoResCategory  category;
    EcoResProductCategory prodCategory;
    RecId catRecid;
    str 100 categoryStr;

    str recursiveCall(RecId _recid)
    {
       while select category where category.RecId == _recid//prodCategory.Category
        {
            categoryStr = '-'+category.code+categoryStr;
        recursiveCall(category.ParentCategory);
        }
        return categoryStr;
    }
    ;
    inventtable = InventTable::find(itemId);
    select prodCategory where prodCategory.Product == inventtable.Product;
    return strDel(recursiveCall(prodCategory.Category),1,1);
}

No comments:

Post a Comment

Dynamically setting entire Form security access through Extension in D365FO

/// <summary> /// To check if user can get access to the Parameter form /// </summary> class SAN_ParamFormsAccessCtrl {     prot...