Getting MainAccount for Particular Account Num: class
public LedgerDimensionAccount
getLedgerDimension(AccountNum _accountNum)
{
MainAccount
mainAccount;
RefRecId
accountStructureId;
List dimensionList = new List(Types::Class);
DimensionDefaultingEngine
dimensionDefaultingEngine;
;
mainAccount = MainAccount::findByMainAccountId(_accountNum);
accountStructureId =
DimensionHierarchy::getAccountStructure(mainAccount.RecId);
if(mainAccount)
{
dimensionDefaultingEngine
= DimensionDefaultingEngine::constructForMainAccountId(mainAccount.RecId,
accountStructureId);
dimensionDefaultingEngine.applyDimensionSources(dimensionList);
return
dimensionDefaultingEngine.getLedgerDimension();
}
else
return 0;
}
No comments:
Post a Comment