Hi,
I have a small doubt is it possible to create and post general journal with out journalNumber?
through code or manually?
Thanks,
Krishna.
Hi,
I have a small doubt is it possible to create and post general journal with out journalNumber?
through code or manually?
Thanks,
Krishna.
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…
Axapta/D365 Corner: How to create General Journal in AX 2012 by X++ code…
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.
Pranav…
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”];
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));
}
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:
How is the voucher number picked. Normally it is updated as per journal selected.
How is the journal lines updated? Are you importing the records?
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.
What can be impact on year end closing?
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.
Thanks,
Pranav…
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.
Pranav…
Thank you chaitynya,pranav vishal…