// Get Default Dimensions value For Vend Cust Item
static void San_GetDefaultDimensionsForVendCustItem(Args _args)
{
VendTable vendTable;
InventTable inventTable;
CustTable custTable;
DimensionAttributeValueSet dimAttrValueSet;
DimensionAttributeValueSetItem dimAttrValueSetItem;
DimensionAttributeValue dimAttrValue;
DimensionAttribute dimAttr;
Common dimensionValueEntity;
;
//vendTable = VendTable::find('3008');
//inventTable = InventTable::find('1001');
custTable = CustTable::find('1102');
//dimAttrValueSet = DimensionAttributeValueSet::find(vendTable.DefaultDimension);
//dimAttrValueSet = DimensionAttributeValueSet::find(inventTable.DefaultDimension);
dimAttrValueSet = DimensionAttributeValueSet::find(custTable.DefaultDimension);
while select dimAttrValueSetItem
where dimAttrValueSetItem.DimensionAttributeValueSet == dimAttrValueSet.RecId
{
dimAttrValue = DimensionAttributeValue::find(dimAttrValueSetItem.DimensionAttributeValue);
dimAttr = DimensionAttribute::find(dimAttrValue.DimensionAttribute);
dimensionValueEntity = DimensionDefaultingControllerBase::findBackingEntityInstance(curext(),dimAttr,dimAttrValue.EntityInstance);
info(dimAttr.Name + ' ' + dimAttrValue.getValue());
}
}
static void San_GetDefaultDimensionsForVendCustItem(Args _args)
{
VendTable vendTable;
InventTable inventTable;
CustTable custTable;
DimensionAttributeValueSet dimAttrValueSet;
DimensionAttributeValueSetItem dimAttrValueSetItem;
DimensionAttributeValue dimAttrValue;
DimensionAttribute dimAttr;
Common dimensionValueEntity;
;
//vendTable = VendTable::find('3008');
//inventTable = InventTable::find('1001');
custTable = CustTable::find('1102');
//dimAttrValueSet = DimensionAttributeValueSet::find(vendTable.DefaultDimension);
//dimAttrValueSet = DimensionAttributeValueSet::find(inventTable.DefaultDimension);
dimAttrValueSet = DimensionAttributeValueSet::find(custTable.DefaultDimension);
while select dimAttrValueSetItem
where dimAttrValueSetItem.DimensionAttributeValueSet == dimAttrValueSet.RecId
{
dimAttrValue = DimensionAttributeValue::find(dimAttrValueSetItem.DimensionAttributeValue);
dimAttr = DimensionAttribute::find(dimAttrValue.DimensionAttribute);
dimensionValueEntity = DimensionDefaultingControllerBase::findBackingEntityInstance(curext(),dimAttr,dimAttrValue.EntityInstance);
info(dimAttr.Name + ' ' + dimAttrValue.getValue());
}
}
No comments:
Post a Comment