GET DEBIT CREDIT VALUES OF VOUCHER IN D365 CODE
public void getvoucherDetails(Args _args)
{
LedgerJournalEngine ledgerJournalEngine;
LedgerJournalTrans ledgerJournalTrans;
LedgerJournalTable ledgerJournalTable;
ledgerJournalTable.clear();
ledgerJournalTrans.clear();
select firstonly ledgerJournalTrans
where ledgerJournalTrans.Voucher == "V00001"; //Add voucher number
ledgerJournalEngine = new ledgerJournalEngine();
ledgerJournalTable = ledgerJournalTable::find(ledgerJournalTrans.JournalNum);
ledgerJournalEngine.newJournalActive(ledgerJournalTable,true);
info(strFmt("%1 - %2", ledgerJournalEngine.voucherDebit(ledgerJournalTrans), ledgerJournalEngine.voucherCredit(ledgerJournalTrans)));
}
Thanks,
Vikas Mehta.
No comments:
Post a Comment