Search code examples
erpacumatica

Auto set active subitem segment value in Stock Item screen


How can I set active all sub-item segments in Subitems tab Stock Items screen using code ? The INSubItemSegmentValue class does not contain the active field...


Solution

  • Here's my solution

    PXCache cache = Base.Caches[typeof(INSubItemSegmentValueList.SValue)];
    
    foreach (INSubItemSegmentValueList.SValue item in cache.Cached)
    {
        item.Active = true;
        cache.Update(item);
    }