web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :

Code to get opening balance for Ledger Main account in Ax 2012

SANTOSH KUMAR SINGH Profile Picture SANTOSH KUMAR SINGH 1,224
If you want to check opening balance for particular main account then you can check below code to get the same.

This is sample Code to get opening balance for Ledger Main account in Ax 2012.

  LedgerBalanceMainAccountAmounts ledgerBalance;  
AmountMst opSum;
;
ledgerBalance = LedgerBalanceMainAccountAmounts::construct();
ledgerBalance.parmIncludeRegularPeriod(true);
ledgerBalance.parmIncludeOpeningPeriod(true);
ledgerBalance.parmIncludeClosingPeriod(false);
ledgerBalance.parmAccountingDateRange(mkDate(01,01,2000), mkDate(31,12,2017));
ledgerBalance.calculateBalance(MainAccount::findByMainAccountId('1123333'));
opSum = ledgerBalance.getAccountingCurrencyBalance();
info(num2str(opSum,10,2,1,1));


This was originally posted here.

Comments

*This post is locked for comments