public static DimensionDefault addNewDimValueToDefautDimension(DimensionDefault defaultDimension, str dimName, str dimValue){DimensionAttributeValueSetStorage dimAttrValDimStorage = DimensionAttributeValueSetStorage::find(defaultDimension);DimensionAttribute dimAttr = DimensionAttribute::findByName(dimName);DimensionAttributeValue dimAttrValue = DimensionAttributeValue::findByDimensionAttributeAndValue(dimAttr, dimValue);dimAttrValDimStorage.addItemValues(dimAttr.RecId, dimAttrValue.RecId, dimAttrValue.HashKey);defaultDimension = dimAttrValDimStorage.save();return defaultDimension;}
No comments. Be the first one to comment on this post.
DaxOnline.org is free platform that allows you to quickly store and reuse snippets, notes, articles related to Dynamics AX.
Authors are allowed to set their own "buy me a coffee" link.
Join us.