The purpose of this blog is for knowledge sharing and connect the relevant audience who are all into Microsoft Dynamics world.
Alfasith AX
Saturday, November 29, 2014
Wednesday, November 19, 2014
Code to print Ledger journal balance in AX
static void AlfasithPrintLedgerBalance(Args _args)
{
LedgerBalanceMainAccountAmounts balance;
MainAccountListPageBalanceParameters balanceParameters;
MainAccount mainAccount;
;
mainAccount = MainAccount::findByMainAccountId( "11120005");
balanceParameters = MainAccountListPageBalanceParameters::construct();
balance = LedgerBalanceMainAccountAmounts::construct();
balance.parmAccountingDateRange(balanceParameters.getStartDate(),balanceParameters.getEndDate());
balance.parmPostingLayer(balanceParameters.getPostingLayer());
balance.parmIncludeOpeningPeriod(balanceParameters.getIncludeOpeningPeriods());
balance.parmIncludeRegularPeriod(balanceParameters.getIncludeOperatingPeriods());
balance.parmIncludeClosingPeriod(balanceParameters.getIncludeClosingPeriods());
balance.parmIncludeClosingPeriodBySystem(balanceParameters.getIncludeClosingPeriods());
balance.calculateBalance(mainAccount);
info(strFmt("%1", balance.getAccountingCurrencyBalance()));
}
{
LedgerBalanceMainAccountAmounts balance;
MainAccountListPageBalanceParameters balanceParameters;
MainAccount mainAccount;
;
mainAccount = MainAccount::findByMainAccountId( "11120005");
balanceParameters = MainAccountListPageBalanceParameters::construct();
balance = LedgerBalanceMainAccountAmounts::construct();
balance.parmAccountingDateRange(balanceParameters.getStartDate(),balanceParameters.getEndDate());
balance.parmPostingLayer(balanceParameters.getPostingLayer());
balance.parmIncludeOpeningPeriod(balanceParameters.getIncludeOpeningPeriods());
balance.parmIncludeRegularPeriod(balanceParameters.getIncludeOperatingPeriods());
balance.parmIncludeClosingPeriod(balanceParameters.getIncludeClosingPeriods());
balance.parmIncludeClosingPeriodBySystem(balanceParameters.getIncludeClosingPeriods());
balance.calculateBalance(mainAccount);
info(strFmt("%1", balance.getAccountingCurrencyBalance()));
}
Subscribe to:
Posts (Atom)
SQL code to upate one Legal entity banner to all the legal entity in D365
Hi, update companyimage set companyimage.Image = companyimageA.Image from ( select Image from companyimage where dataAreaid = 'USF...
-
Hi, AccountingDistribution ( accounting distribution 7452 ) AccountingDistributionEventTmp ( accounting distribution 100001 ) Accountin...
-
Hi, Create a EDT name it Gender then in properties enumType : //select the enum name Use the below code and enjoy. static v...