static void AddingDimensionValuesForCustomDimension(Args _args)
{
DimensionAttribute dimensionAttribute;
DimensionFinancialTag dimensionFinancialTag;
DimensionAttributeDirCategory dimAttributeDirCategory;
int64 dirCategory;
;
dimensionAttribute = dimensionAttribute::findByName("CUSTOMCOSTCENTER");// Custom Dimension
// Only user defined dimensions will have a financial tag category
if (dimensionAttribute.Type == DimensionAttributeType::CustomList)
{
select firstonly DirCategory from dimAttributeDirCategory where dimAttributeDirCategory.DimensionAttribute == dimensionAttribute.RecId;
dirCategory = dimAttributeDirCategory.DirCategory;
}
DimensionFinancialTag.Value = "1000";//Custom Dimension Value
DimensionFinancialTag.Description = "test"; // Custom Dimension Description
DimensionFinancialTag.FinancialTagCategory = dirCategory;
DimensionFinancialTag.insert();
}
{
DimensionAttribute dimensionAttribute;
DimensionFinancialTag dimensionFinancialTag;
DimensionAttributeDirCategory dimAttributeDirCategory;
int64 dirCategory;
;
dimensionAttribute = dimensionAttribute::findByName("CUSTOMCOSTCENTER");// Custom Dimension
// Only user defined dimensions will have a financial tag category
if (dimensionAttribute.Type == DimensionAttributeType::CustomList)
{
select firstonly DirCategory from dimAttributeDirCategory where dimAttributeDirCategory.DimensionAttribute == dimensionAttribute.RecId;
dirCategory = dimAttributeDirCategory.DirCategory;
}
DimensionFinancialTag.Value = "1000";//Custom Dimension Value
DimensionFinancialTag.Description = "test"; // Custom Dimension Description
DimensionFinancialTag.FinancialTagCategory = dirCategory;
DimensionFinancialTag.insert();
}
No comments:
Post a Comment