General Journals Posting


I have a small doubt is it possible to create and post general journal with out journalNumber?

through code or manually?



Hi Krishna,

What actually you wanna do …??

Because journal number is mandatory when creating or posting General journal, So you need to specify the journal num.

No, you cant create and post general journal without journalNumber…

this might help you…

through code is it possible to create and post the vouchers(General journal)?

Thats what Vishal and Chaitanya have written. You can’t.

Journal number is mandatory on ledgerjournaltrans and even if you manage to post it then that will be a big mess.


Yes, U can create and post a general journal through code… but Journal number is mandatory…

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”];
accPattern = [“420100”, “420100”, 0];
offSetPattern = [“420200”, “420200”, 0];
axLedgerJournalTrans.parmOffsetAccountType(LedgerJournalACType:: Ledger );
axLedgerJournalTrans.parmOffsetLedgerDimension(AxdDimensionUtil::getLedgerAccountId( offSetPattern));;
info(strFmt(“Journal %1 created with finential Dimension %2”, axLedgerJournalTable.ledgerJournalTable().JournalNum,axLedgerJournalTable.ledgerJournalTable().DefaultDimension));

this is the code t create a general journal through code…

to post it through code go through the ax 2012 development cookbook …

Hi Chaitanya,

Please clarify certain points:

  1. How is the voucher number picked. Normally it is updated as per journal selected.

  2. How is the journal lines updated? Are you importing the records?

  3. Ledgerjournaltrans has journal number mandatory. This is so because if for audit purpose it is required to see the originating document, how can we show that.

  4. What can be impact on year end closing?

  5. And above all, if the auditors ask the purpose, what would be the answer?

My point is doing something is possible but what about it’s impact.



Hi Pranav,

we can create and post general journal … onlty when journal number is specified(mandatory)…

thats what i said …

the above code works only if u specify the journal number…

Please observe the code…

Hi Chaitanya,

Got your point. Actually i am limited to technical so raised the points.


Thank you chaitynya,pranav vishal…