static void ItemDimUpdate(Args _args)
{
InventTable inventTable;
Struct dim = new Struct();
container dimValue;
DimensionDefault DimensionDefault;
;
dim.add('BusinessUnit', '002');
dim.add('CostCenter', '007');
dim.add('Department', '022');
dim.add('ItemGroup', 'Audio Test');
dim.add('Project', '000002');
dimValue += dim.fields();
dimValue += dim.fieldName(1);
dimValue += dim.valueIndex(1);
dimValue += dim.fieldName(2);
dimValue += dim.valueIndex(2);
dimValue += dim.fieldName(3);
dimValue += dim.valueIndex(3);
dimValue += dim.fieldName(4);
dimValue += dim.valueIndex(4);
dimValue += dim.fieldName(5);
dimValue += dim.valueIndex(5);
ttsBegin;
DimensionDefault = AxdDimensionUtil::getDimensionAttributeValueSetId(dimValue);
inventTable = inventTable::find("A0001",true);
inventTable.DefaultDimension = DimensionDefault;
inventTable.update();
ttsCommit;
}
{
InventTable inventTable;
Struct dim = new Struct();
container dimValue;
DimensionDefault DimensionDefault;
;
dim.add('BusinessUnit', '002');
dim.add('CostCenter', '007');
dim.add('Department', '022');
dim.add('ItemGroup', 'Audio Test');
dim.add('Project', '000002');
dimValue += dim.fields();
dimValue += dim.fieldName(1);
dimValue += dim.valueIndex(1);
dimValue += dim.fieldName(2);
dimValue += dim.valueIndex(2);
dimValue += dim.fieldName(3);
dimValue += dim.valueIndex(3);
dimValue += dim.fieldName(4);
dimValue += dim.valueIndex(4);
dimValue += dim.fieldName(5);
dimValue += dim.valueIndex(5);
ttsBegin;
DimensionDefault = AxdDimensionUtil::getDimensionAttributeValueSetId(dimValue);
inventTable = inventTable::find("A0001",true);
inventTable.DefaultDimension = DimensionDefault;
inventTable.update();
ttsCommit;
}
No comments:
Post a Comment