Hi,
i need to lookup product Hierarchy in a new form field
Hi,
i need to lookup product Hierarchy in a new form field
Hi , i solved the problem by add a new control (Reference Group ) and override Lookup Reference
method and add the below code :
public Common lookupReference()
{
Common ret;
EcoResCategory ecoResCategoryLocal;
EcoResCategoryHierarchy categoryHierarchy ;//= EcoResCategoryHierarchy::find(ecoResProductCategory.CategoryHierarchy);
select firstonly categoryHierarchy;
ret = EcoResCategory::lookupCategoryHierarchy(this,
categoryHierarchy);
if (ret.TableId == tableNum(EcoResCategory))
{
ecoResCategoryLocal = ret.data();
// update the current Category hierarchy if selected category belongs to another hierarchy.
if (ecoResCategoryLocal.RecId &&
ecoResCategoryLocal.CategoryHierarchy != ecoResCategoryLocal.CategoryHierarchy)
{
ecoResCategoryLocal.CategoryHierarchy = ecoResCategoryLocal.CategoryHierarchy;
}
}
return ret;
}
Hi Ahmed,
Here is an example for you. Maybe you use this as reference and create your own code
André Arnaud de Cal...
293,278
Super User 2025 Season 1
Martin Dráb
231,991
Most Valuable Professional
nmaenpaa
101,156
Moderator