Try Microsoft Edge
A fast and secure browser that's designed for Windows 10
I'm having an issue with uploading general journal using X++.
So previously, I developed a form to upload excel which will create general journal. The voucher was filled correctly in connection to balance. But the side effect with this, users encounter a lot of duplicate voucher issue.
So we decided to use the allocate voucher number on posting setup. This setting uses the temporary voucher number sequence in general ledger parameter setup. But when I upload the excel, the voucher series was not filled in connection to balance. Instead it generates one temporary voucher number per journal line. Below is my code when I generate the voucher number:
_numberSeq = NumberSeq::newGetVoucherFromId(_ledgerJournalTable.NumberSequenceTable);_voucher = _numberSeq.voucher(); _axJournalTrans.parmVoucher(_voucher);
I have also tried this code:
_numberSeq = NumberSeq::newGetVoucherFromId(_ledgerJournalTable.NumberSequenceTable);_voucher = new JournalVoucherNum(JournalTableData::newTable(LedgerJournalTable::find(_ledgerJournalTable.JournalNum))).getNew(true);_axJournalTrans.parmVoucher(_voucher);
Both give the same result. Any idea what went wrong? Thank you!
Business Applications communities