Friday 11 October 2019

GET DEBIT CREDIT VALUES OF VOUCHER IN D365 CODE

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

AZURE INTERVIEW QUESTIONS AND ANSWERS

AZURE INTERVIEW QUESTIONS AND ANSWERES 2021 2. What is cloud computing? Explanation:  It is the use of servers on the internet to “store...