Get dimensions:
DimensionAttribute dimAttr;Get dimension values for the "CostCenter" dimension:
DimensionAttributeSetItem dimAttrSetItem;
DimensionAttributeSetItem dimAttrSetItemEditable;
DimensionEnumeration dimensionSetId;
dimensionSetId = DimensionCache::getDimensionAttributeSetForLedger();
while select dimAttr
order by Name
where dimAttr.Type != DimensionAttributeType::MainAccount
join RecId from dimAttrSetItem
where dimAttrSetItem.DimensionAttribute == dimAttr.RecId &&
dimAttrSetItem.DimensionAttributeSet == dimensionSetId
outer join RecId from dimAttrSetItemEditable
where !dimAttrSetItemEditable.DimensionAttributeSet &&
dimAttrSetItemEditable.DimensionAttribute == dimAttr.RecId &&
dimAttrSetItemEditable.EnumerationValue == NoYes::Yes
{
info(dimAttr.Name);
}
Common common;
DimensionAttribute dimAttr;
select firstOnly dimAttr where dimAttr.Name == "CostCenter";
common = new DictTable(dimAttr.BackingEntityType).makeRecord();
while select common
{
info(strFmt("%1", common.(dimAttr.NameAttribute)));
}
No comments:
Post a Comment