Carry out the following steps in order to complete this recipe:
- Create a new Dynamics 365 solution named CreateGeneralJournal. Change the model name in properties with the one created earlier.
- In the project, create a new class named LedgerJournalTransData with the following code snippet:
public class LedgerJournalTransData extends JournalTransData { } public void create( boolean _doInsert = false, boolean _initVoucherList = true) { lastLineNum++; journalTrans.LineNum = lastLineNum; if (journalTableData.journalVoucherNum()) { this.initVoucher( lastVoucher, false, _initVoucherList); } this.addTotal(false, false); if (_doInsert) { journalTrans.doInsert(); } else { journalTrans.insert(); } if (journalTableData.journalVoucherNum()) ...