|
10.09.2012, 23:15 | #1 |
Участник
|
axaptacorner: How to create General Journal in AX 2012 by X++ code
Источник: http://axaptacorner.blogspot.com/201...nal-in-ax.html
============== With following code we can create general journal with default dimention and ledger Account just change default values according to youe system data and simply run the job static void Demo_CreateGLJrl(Args _args) { AxLedgerJournalTable axLedgerJournalTable ; AxLedgerJournalTrans axLedgerJournalTrans; container accPattern; container offSetPattern; container dimPattern1; ; axLedgerJournalTable = new AxLedgerJournalTable(); axLedgerJournalTrans = new AxLedgerJournalTrans(); dimPattern1 = [1,"Department", "000"]; axLedgerJournalTable.parmDefaultDimension(AxdDimensionUtil::getDimensionAttributeValueSetId(dimPattern1)); axLedgerJournalTable.parmJournalName("GenJrn"); axLedgerJournalTable.save(); axLedgerJournalTrans.parmJournalNum(axLedgerJournalTable.ledgerJournalTable().JournalNum); axLedgerJournalTrans.parmTransDate(systemDateGet()); axLedgerJournalTrans.parmAccountType(LedgerJournalACType::Ledger); accPattern = ["420100", "420100", 0]; axLedgerJournalTrans.parmLedgerDimension(AxdDimensionUtil::getLedgerAccountId(accPattern)); offSetPattern = ["420200", "420200", 0]; axLedgerJournalTrans.parmOffsetAccountType(LedgerJournalACType:: Ledger ); axLedgerJournalTrans.parmOffsetLedgerDimension(AxdDimensionUtil::getLedgerAccountId( offSetPattern)); axLedgerJournalTrans.save(); info(strFmt("Journal %1 created with finential Dimension %2", axLedgerJournalTable.ledgerJournalTable().JournalNum,axLedgerJournalTable.ledgerJournalTable().DefaultDimension)); } Источник: http://axaptacorner.blogspot.com/201...nal-in-ax.html
__________________
Расскажите о новых и интересных блогах по Microsoft Dynamics, напишите личное сообщение администратору. |
|
|
|