DimensionAttributeValue dimAttrValue;
DimensionAttribute dimAttr;
DimensionAttributeValueSetStorage davss;
RecId defaultDimension;
DimensionAttribute dimAttr;
DimensionAttributeValueSetStorage davss;
RecId defaultDimension;
davss = DimensionAttributeValueSetStorage::find(this.DefaultDimension);
dimAttr = DimensionAttribute::findByName(‘MyDimensionName’);
dimAttrValue = DimensionAttributeValue::findByDimensionAttributeAndValue(dimAttr, “DimensionValue”, false, true);
if(dimAttrValue)
{
davss.addItem(dimAttrValue);
this.DefaultDimension = davss.save();
}
dimAttrValue = DimensionAttributeValue::findByDimensionAttributeAndValue(dimAttr, “DimensionValue”, false, true);
if(dimAttrValue)
{
davss.addItem(dimAttrValue);
this.DefaultDimension = davss.save();
}
In case we need to set the Ledger Dimension
LedgerDimensionFacade::serviceCreateLedgerDimension(LedgerDefaultAccountHelper::getDefaultAccountFromMainAccountRecId(MainAccount::findByMainAccountId(_mainAccount).RecId),_FinDim);
No comments:
Post a Comment