Wednesday, 18 February 2015

Multiple PDC(Post Dated Cheques) Settlement In Ax 2012

In Ax 2012 R2 we don't have functionality to post multiple PDC's at on click

Solution :

We need a simple customization to enable this functionality

Steps :

-> Go to AOT->Forms-> VendPostDatedChecks->Designs->ActionPaneTab->SettleClearingTransaction

-> open properties of "SettleClearingTransaction" and change property "Multiselect" to "Yes"
-> In form design Go to ListPageGrid properties and change "Autodeclaration" to "Yes"
-> copy and paste the below code in Click method in "SettleClearingTransaction" button.


void clicked()
{
    //NS - Added by Shreedhara for multiselect posting option
    boolean multiSelected;
    CustVendPDCRegister _custVendPDCRegister,custVendPDCloc;
    super();
    if(CustVendPDC_ds.anyMarked())
    {
        _custVendPDCRegister = CustVendPDC_ds.getFirst(true);
        while(_custVendPDCRegister)
        {
            custVendPDCloc =            CustVendPDCRegister::findByReference(_custVendPDCRegister.LedgerJournalTrans);
            if(custVendPDCloc.PDCStatus == PostDatedCheckStatus::Posted)
            {
                CustVendPDCManager::settleClearingTransactions(custVendPDCloc);
                multiSelected = true;
            }
            _custVendPDCRegister = CustVendPDC_ds.getNext();
        }

    }
    if (multiSelected)
    {
        CustVendPDC_ds.research();
        CustVendPDC_ds.first();
        CustVendPDC_ds.mark(0);
        ListPageGrid.setFocus();
    }
    else
    {
        CustVendPDC_ds.reread();
        CustVendPDC_ds.active();
    }
}

2 comments:

  1. This is what i was looking for. When you are going to post rest of this article
    Postdated cheque management | Cheque printing in dubai

    ReplyDelete
  2. Hi,

    we are getting error while settle the clearing entries on maturity date as “Posting without amount cannot be made” can you help me on this

    ReplyDelete