static void CreateGLJournal(Args _args)
{
AxLedgerJournalTable header = new AxLedgerJournalTable();
AxLedgerJournalTrans trans = new AxLedgerJournalTrans();
container ledgerDimensions,offsetDimensions;
ledgerJournalCheckPost ledgerJournalCheckPost;
LedgerJournalTrans ledgerJournalTrans;
header.parmJournalName("GenJrn");
header.save();
trans.parmJournalNum(header.ledgerJournalTable().JournalNum);
trans.parmAccountType(LedgerJournalACType::Ledger);
ledgerDimensions = ["201140","201140",2,"Businessunit","001", "Department", "026"];
trans.parmLedgerDimension(AxdDimensionUtil::getLedgerAccountId(ledgerDimensions));
ledgerJournalTrans = trans.ledgerJournalTrans();
ledgerJournalTrans.modifiedField(fieldNum(ledgerJournalTrans,LedgerDimension));
trans.parmAmountCurDebit(123);
trans.parmOffsetAccountType(LedgerJournalACType::Ledger);
offsetDimensions = ["110110","110110",2,"BusinessUnit","001","Department","026"];
ledgerJournalTrans.OffsetLedgerDimension = AxdDimensionUtil::getLedgerAccountId(offsetDimensions);
ledgerJournalTrans.modifiedField(fieldNum(ledgerJournalTrans,OffsetLedgerDimension));
trans.save();
info(strFmt("Journal No. %1.", header.ledgerJournalTable().JournalNum));
ledgerJournalCheckPost = ledgerJournalCheckPost::newLedgerJournalTable(header.ledgerJournalTable(),NoYes::Yes);
ledgerJournalCheckPost.run();
}
Hi i tried creating a header through x++ and manually added lines on the form. and i have a workflow on invoice journal. My workflow has 2 levels of approval, on the 2nd level when i try to reassign it to another user, I get an error saying "Subject and message is missing." Hope you can help me with that.
ReplyDelete