Showing posts with label Post Dated checks. Show all posts
Showing posts with label Post Dated checks. Show all posts

Settle Clearing Entries (Postdated Check) Status



Settle Clearing Entries (Postdated Check) Status



Recently I face the issue that after posting of payment journal status of a post-dated check was not changed from Open to Post. I have lots of R&D in this but no luck,

So I write a batch job where will change the status of custVendPosted check for me.






    LedgerJournalTable _ledgerJournalTable;
    LedgerJournalTrans _ledgerJournalTrans;
    CustVendPDCRegister custPDC;
    Counter             _counter=0;

    while select forUpdate custPDC
            where custPDC.PDCStatus==PostDatedCheckStatus::Open
            && custPDC.MaturityDate > systemDateGet()
          exists join _ledgerJournalTrans
            where custPDC.LedgerJournalTrans==_ledgerJournalTrans.RecId
          exists join _ledgerJournalTable
            where _ledgerJournalTrans.JournalNum==_ledgerJournalTable.JournalNum
            && _ledgerJournalTable.Posted==NoYes::Yes
    {
               _counter++;
               custPDC.PDCStatus=PostDatedCheckStatus::Posted;
               ttsBegin;
               custPDC.update();
               ttsCommit;

    }
        info(strFmt("Total Number %1 of records updated on %2.",_counter,today()));


Virtual Fields Vs Computed Fields

  Virtual Field: A virtual field in D365FO is a field that doesn't have a direct representation in the database. It's a field that y...