public static void main(Args _args)
{
MainAccount mainaccount;
LedgerDimensionDefaultAccount lda;
mainaccount = MainAccount::findByMainAccountId("110110");
lda = LedgerDefaultAccountHelper::getDefaultAccountFromMainAccountRecId(mainaccount.RecId);
Info(strFmt("%1",lda));
}
......................................
Other Way :
public static void main(Args _args)
{
DimensionDynamicAccount offsetLedgerDim;
Array acctDimAttrArray = new Array(Types::String);
acctDimAttrArray.value(1,"MainAccount");
Array acctDimArray = new Array(Types::String);
acctDimArray.value(1,'112010');
DefaultDimensionIntegrationValues DefaultDimensionIntegrationValues = DimensionResolver::getEntityDisplayValue
(acctDimAttrArray, acctDimArray, extendedTypeStr(DimensionDynamicAccount), LedgerJournalACType::Ledger);
DimensionDynamicAccountResolver DimensionDynamicAccountResolver = DimensionDynamicAccountResolver::newResolver
(DefaultDimensionIntegrationValues, LedgerJournalACType::Ledger, curExt());
offsetLedgerDim = DimensionDynamicAccountResolver.resolve();
info(strFmt("%1",offsetLedgerDim));
}
After runinng the job a recid will be generated.
if you are getting an error like : No active format for data entities has been set up. Set up an active format for each dimension format type. then do the following step.
in my code i've given a value for main account only, so i have added main account in dimension configuration.
No comments:
Post a Comment