public RecId defaultDimension(Name _Dim1, Name _Dim2)
{
container defDimensionCon;
DimensionDefault dimensionDefault;
int i;
Struct struct = new Struct();
;
if(_Dim1||_Dim2)
{
if (_Dim1)
{
struct.add("Products", _Dim1);
}
if (_Dim2)
{
struct.add("SubProducts", _Dim2);
}
}
defDimensionCon += struct.fields();
for (i = 1; i <= struct.fields(); i++)
{
defDimensionCon += struct.fieldName(i);
defDimensionCon += struct.valueIndex(i);
}
if (struct.fields() &&(_Dim1||_Dim2))
{
dimensionDefault = AxdDimensionUtil::getDimensionAttributeValueSetId(defDimensionCon);
}
return dimensionDefault;
}
{
container defDimensionCon;
DimensionDefault dimensionDefault;
int i;
Struct struct = new Struct();
;
if(_Dim1||_Dim2)
{
if (_Dim1)
{
struct.add("Products", _Dim1);
}
if (_Dim2)
{
struct.add("SubProducts", _Dim2);
}
}
defDimensionCon += struct.fields();
for (i = 1; i <= struct.fields(); i++)
{
defDimensionCon += struct.fieldName(i);
defDimensionCon += struct.valueIndex(i);
}
if (struct.fields() &&(_Dim1||_Dim2))
{
dimensionDefault = AxdDimensionUtil::getDimensionAttributeValueSetId(defDimensionCon);
}
return dimensionDefault;
}
No comments:
Post a Comment