// Step-1: Separate all dimensions from Source Main Account from Ledger Dimension and keep it as "OnlyDefaultDimension"
//Step-2: Merge this OnlyDefaultDimension with another Main Account Rec Id.
public static RecId createLedgerDimensionCombination(RecId _sourceLedgerDimension, RecId _targetMainAccountRecId)
{
RecId
onlyDefaultDimension, targetLedgerDimension;
DimensionHierarchyId accountStructureId;
// Extract from source ledger dimension
onlyDefaultDimension = LedgerDimensionFacade::getDefaultDimensionFromLedgerDimension(_sourceLedgerDimension);
accountStructureId = DimensionHierarchy:: getAccountStructure(_targetMainAccountRecId);
// Adding with another main account.
targetLedgerDimension = LedgerDimensionDefaultingEngine:: getLedgerDimensionFromAccountAndDim(_targetMainAccountRecId,
accountStructureId, onlyDefaultDimension);
return targetLedgerDimension;
}
No comments:
Post a Comment