Hi folks!
Recently I've had a task in which I need to change visibility of particular button if Item number was serialized.
I found a way how to identify it by checking InventTrans statusReceipt.
But after that my colleague advised to me a way with checking Tracking Dimension Group and now I wanted to share this approach with you, guys!
Maybe it will be useful for someone in future.
Code below:
private boolean checkItemSerialized(ItemId _itemId)
{
EcoResTrackingDimensionGroupItem trackingDimensionGroupItem;
EcoResTrackingDimensionGroup trackingDimensionGroup;
boolean ret;
;
trackingDimensionGroupItem = EcoResTrackingDimensionGroupItem::findByItem(curext(), _itemId);
trackingDimensionGroup = EcoResTrackingDimensionGroup::find(trackingDimensionGroupItem.TrackingDimensionGroup);
if (trackingDimensionGroup.Name == #DimSerial)
{
ret = true;
}
return ret;
}
Комментариев нет:
Отправить комментарий